Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Edited Issue: LayoutAnchorable Transparent Background [21172]

$
0
0
One cannot get a transparent background on a LayoutAnchorable, in the Generic Theme.

You can set the color explicitly by setting a style on a LayoutAnchorableControl as follows:
```
<Style TargetType="{x:Type avalonDockCtls:LayoutAnchorableControl}">
<Setter Property="Background" Value="Blue" />
</Style>
```
However if you make the Background above transparent there is still a color applied. This color seems to be coming from the LayoutAnchorablePaneControl element, and one would expect that setting it's Background in a style would have the desired effect:
```
<Style TargetType="{x:Type avalonDockCtls:LayoutAnchorablePaneControl}">
<Setter Property="Control.Background" Value="Transparent" />
</Style>
```
The above has no effect however.

It seems that in all themes, except for generic theme, the AnchorablePaneControlStyle contains a Background binding as follows:
```
<Setter Property="Background" Value="{Binding Model.Root.Manager.Background, RelativeSource={RelativeSource Self}}"/>
```

The above changes the background to whatever the DockingManger itself is set to, while still allowing one to set the Individual LayoutAnchorableControl styles.

Therefore if the docking manager is transparent, so is the LayoutAnchorablePaneControl.

This allows whatever color is set on the Dockingmanager to flow to the LayoutAnchorableControl, and can be overridden there if need be.

Regards
Bradley

Viewing all articles
Browse latest Browse all 4964

Trending Articles