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);
}