I have a RadExpander on a UserControl. The datacontext of the UserControl (and therefor of the RadExpander) is bound to the selecteditem of a RadDataGrid (a list/details solution).The datacontext is a viewmodel and all my viewmodels implements INotifyPropertyChanged.
The first time I select an item in my datagrid, it goes well. After that, the pink textblock shows the previous Name (string) while the green shows the current.
That seems like a bug to me.
I cant just use the green one, because in my real solution I need to do complex stuff with datatriggers, but this is what it boils down to.
Here is the XAML, and I have attached a picture from my running program:
<telerik:RadExpander x:Name="_myExpander" Grid.Column="0" Grid.Row="2" ExpandDirection="Down" ToolTipService.Placement="Center" HorizontalContentAlignment="Stretch" Margin="0,0,2,0"> <telerik:RadExpander.Style> <Style TargetType="{x:Type telerik:RadExpander}"> <Setter Property="IsExpanded" Value="True" /> <Style.Triggers> <DataTrigger Binding="{Binding}" Value="{x:Null}"> <Setter Property="IsExpanded" Value="False" /> </DataTrigger> </Style.Triggers> </Style> </telerik:RadExpander.Style> <telerik:RadExpander.Header> <Border Margin="2, 0, -8, 0" Background="White" MinHeight="22"> <Grid VerticalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid Margin="2,2,4,2" Grid.Column="0" Background="LightPink"> <TextBlock > <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Text" Value="{Binding Name}" /> </Style> </TextBlock.Style> </TextBlock> </Grid> <Grid Margin="14,2,4,2" Grid.Column="1" Background="DarkSeaGreen"> <TextBlock Text="{Binding Name}" /> </Grid> </Grid> </Border> </telerik:RadExpander.Header> <telerik:RadExpander.Content> <TextBlock Margin="24,24,2,2" Text="Body" /> </telerik:RadExpander.Content> </telerik:RadExpander>