Palette in an expander


i have a problem with the palette. Because i dont want to have scrollbars i searched the forum and found that i have to manipulate the ControlTemplate:


<Border x:Name=“Border”
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer HorizontalScrollBarVisibility=“Disabled”
<go:DiagramPanel x:Name=“Panel”
Padding="{TemplateBinding Padding}"
AutoScrollRegion=“0 0 0 0”
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />


when i now open the expander nothing is showed by the palette. Only when i change the size of the grid colum which the expander holds, the the palette is drawn correctly. But without this “update” action the palettes height propertiy is 0 :( When i enable the scrollBarVisbility in the style above everything works fine. Is it a bug in palette?

What happens if you remove the ScrollViewer?

ist the same, doesnt help…

You don’t show any expander, so I cannot know what might be happening.
If you use a Canvas instead of a Diagram, does it have zero height too?

No, when i use canvas it has no Zero height. This is my expander code:

<go:Palette Grid.Row=“0” Padding=“10”
MaximumSelectionCount=“1” AllowScroll=“False”
Model="{Binding LogicCategoryPalette}"
NodeTemplateDictionary="{StaticResource NodeTemplateDictionary}"
<go:GridLayout Alignment=“Position” CellSize=“5 5” WrappingColumn=“1” />

You’re not setting the size of the Palette, but I think you need to.
Also I do not understand why there is a Grid.Row attribute.
Maybe you copied this from a situation where the Palette would naturally be given a size?