or

| <Style x:Key="GroupSecurityRadTreeStyle" TargetType="telerik:RadTreeViewItem"> |
| <Setter Property="CheckState" Value="{Binding IsGroupActivated,Mode=TwoWay, Converter={StaticResource CheckStateConverter}}"/> |
| <Setter Property="IsExpanded" Value="True"/> |
| </Style> |
| public class CheckStateConverter : IValueConverter |
| { |
| public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
| { |
| bool? result = (bool?)value; |
| if (result.HasValue) |
| { |
| return result.Value ? ToggleState.On : ToggleState.Off; |
| } |
| else |
| { |
| ToggleState o = ToggleState.Indeterminate; |
| return o; |
| } |
| } |
| public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
| { |
| ToggleState state = (ToggleState)value; |
| return state == ToggleState.On ? true : false; |
| } |
| } |
/// <summary>
/// Add page to page collection
/// </summary>
/// <param name="content"></param>
/// <param name="title"></param>
private void addContent(UserControl content, string title)
{
ContentControl page = new ContentControl();
page.Content = content;
contentPages.Add(page);
mainContent.Transition =
null //took transition out for now
mainContent.Content = page;
addBreadcrumb(title,page);
}
Im am changing the GridView HeaderCellStyle in code.
Calling .UpdateLayout does not show the new header style.
| Private Sub chkComplexFilter_Checked(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles chkComplexFilter.Checked |
| ShowFilterHeader("GridViewHeaderCellFilterComplexStyle") |
| RadGridView1.UpdateLayout() |
| End Sub |
| Sub ShowFilterHeader(ByVal styleName As String) |
| For Each col In RadGridView1.Columns |
| col.HeaderCellStyle = CType(Resources(styleName), Style) |
| Next |
| End Sub |
Resizing the window (using the bottom right window corner) to make parts of the grid invisible and than visible again causes the new style to be shown in the freshly painted parts.