This question is locked. New answers and comments are not allowed.
Hallo,
I'm using the Expander in a ListBox ItemTemplate like this:
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<telerik:RadExpander Grid.Column="0" x:Name="radExpander" VerticalAlignment="Top"
ExpandDirection="Down"
telerik:AnimationManager.IsAnimationEnabled="True"
FlowDirection="RightToLeft" >
<telerik:RadExpander.Header>
[...]
</telerik:RadExpander.Header>
<telerik:RadExpander.Content>
[...]
</telerik:RadExpander.Content>
</telerik:RadExpander>
<telerik:RadToggleButton [...]/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
When I expand the Expander, the size of the list box is increased, but on collapsing the Expander the size of the list box stays remains unchanged. It is only adjusted correctly when the list changes by adding or deleting an item. Is there a way to trigger the correct resizing on collapsing the Expander?
Thanks for your help,
Philip Thomé
I'm using the Expander in a ListBox ItemTemplate like this:
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<telerik:RadExpander Grid.Column="0" x:Name="radExpander" VerticalAlignment="Top"
ExpandDirection="Down"
telerik:AnimationManager.IsAnimationEnabled="True"
FlowDirection="RightToLeft" >
<telerik:RadExpander.Header>
[...]
</telerik:RadExpander.Header>
<telerik:RadExpander.Content>
[...]
</telerik:RadExpander.Content>
</telerik:RadExpander>
<telerik:RadToggleButton [...]/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
When I expand the Expander, the size of the list box is increased, but on collapsing the Expander the size of the list box stays remains unchanged. It is only adjusted correctly when the list changes by adding or deleting an item. Is there a way to trigger the correct resizing on collapsing the Expander?
Thanks for your help,
Philip Thomé