/// <summary> /// Sets up the left portion of the view where languages or projects will be displayed. /// </summary> /// <param name="container">Container where the controls are to be placed.</param> private void SetUpLanguageAndProjectSelectors(Grid container) { var subContainer = container.AddGridItem(0, 0, new Grid()); subContainer.RowDefinitions.Add(new RowDefinition { Height = new GridLength(0, GridUnitType.Auto) }); subContainer.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); var selectorGroup = subContainer.AddGridItem(0, 0, UITheme.CreateGroupBox("Pivoting mode")); var selectorPanel = new StackPanel { Orientation = Orientation.Horizontal }; selectorGroup.Content = selectorPanel; var radioButtonLanguages = selectorPanel.Children.AddAndReference(UITheme.CreateRadioButton("Languages")); radioButtonLanguages.IsChecked = true; radioButtonLanguages.Checked += (x, y) => PivotMode = ViewPivotMode.Languages; var radioButtonProjects = selectorPanel.Children.AddAndReference(UITheme.CreateRadioButton("Projects")); radioButtonProjects.Checked += (x, y) => PivotMode = ViewPivotMode.Projects; PivotGroup = subContainer.AddGridItem(1, 0, UITheme.CreateGroupBox("Language groups and languages")); LanguageOrProjectList = new ListView(); LanguageOrProjectList.ItemTemplate = (DataTemplate)LanguageOrProjectList.FindResource("LanguageListItemTemplate"); PivotGroup.Content = LanguageOrProjectList; }
/// <summary> /// Sets up the right portion of the view where checks will be displayed. /// </summary> /// <param name="container">Container where the controls are to be placed.</param> private void SetUpCheckList(Grid container) { var group = container.AddGridItem(0, 1, UITheme.CreateGroupBox("Checks")); CheckList = new ListView(); CheckList.ItemTemplate = (DataTemplate)LanguageOrProjectList.FindResource("CheckItemTemplate"); group.Content = CheckList; }