I am placing a RadExpander on a WPF window and set the IsExapnded property to False so when the window is loaded it (the expander) should display closed initially.
I'm using a MVVM pattern so I initially thought that something was wrong with the binding, but after explicitly setting the IsExpanded="False" on the RadExpander control in the xaml I recieved the same result with the window opening with the expander open instead of closed. I even went as far as coding in the code behind of the window loaded event handler to set the IsExpanded = False. This didn't work either.
The odd thing is the toggle thinks the expander is closed, but the content area is open. so you have to toggle open and then closed and the functionality of the control starts to work.
Here is the code:
I'm using a MVVM pattern so I initially thought that something was wrong with the binding, but after explicitly setting the IsExpanded="False" on the RadExpander control in the xaml I recieved the same result with the window opening with the expander open instead of closed. I even went as far as coding in the code behind of the window loaded event handler to set the IsExpanded = False. This didn't work either.
The odd thing is the toggle thinks the expander is closed, but the content area is open. so you have to toggle open and then closed and the functionality of the control starts to work.
Here is the code:
<
telerik:RadExpander x:Name="ValidationExpander" BorderBrush="#888888" BorderThickness="1" Background="#EEEEEE"
IsExpanded="False" MinWidth="500" Canvas.Bottom="0" ExpandDirection="Up" Canvas.Left="0">
<telerik:RadExpander.Header>
<TextBlock x:Name="expanderCaption" Foreground="#000000" Visibility="Visible" />
</telerik:RadExpander.Header>
<telerik:RadExpander.Content>
<local:MessageBoxControl DataContext="{Binding MessageBoxViewModel, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Top"/>
</telerik:RadExpander.Content>
</telerik:RadExpander>