Exemple #1
0
        protected override void ClearContainerForItemOverride(DependencyObject element, object item)
        {
            base.ClearContainerForItemOverride(element, item);
            RibbonContextualTabGroup tabGroupHeader = element as RibbonContextualTabGroup;

            if (tabGroupHeader != null)
            {
                tabGroupHeader.ClearTabGroupHeader();
            }
        }
Exemple #2
0
        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
        {
            base.PrepareContainerForItemOverride(element, item);
            RibbonContextualTabGroup tabGroupHeader = element as RibbonContextualTabGroup;

            if (tabGroupHeader != null)
            {
                tabGroupHeader.PrepareTabGroupHeader(item, ItemTemplate, ItemTemplateSelector, ItemStringFormat);
            }
        }
Exemple #3
0
        internal RibbonContextualTabGroup FindHeader(object content)
        {
            int count = this.Items.Count;

            for (int i = 0; i < count; i++)
            {
                RibbonContextualTabGroup tabGroup = this.ItemContainerGenerator.ContainerFromIndex(i) as RibbonContextualTabGroup;
                if (tabGroup != null && Object.Equals(tabGroup.Header, content))
                {
                    return(tabGroup);
                }
            }
            return(null);
        }
Exemple #4
0
        private bool HasTabs(FrameworkElement container)
        {
            RibbonContextualTabGroup tabGroupHeader = container as RibbonContextualTabGroup;

            if (tabGroupHeader == null ||
                !tabGroupHeader.IsVisible)
            {
                return(false);
            }
            foreach (RibbonTab tab in tabGroupHeader.Tabs)
            {
                if (tab != null && tab.IsVisible)
                {
                    return(true);
                }
            }
            return(false);
        }
		/// <summary>
		///     Called when HeaderProperty is invalidated on "d."
		/// </summary>
		private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
		{
			RibbonContextualTabGroup ctrl = (RibbonContextualTabGroup)d;
			ctrl.OnHeaderChanged(e.OldValue, e.NewValue);
		}
			public TabsEnumerable(RibbonContextualTabGroup tabGroup)
			{
				ContextualTabGroup = tabGroup;
			}
Exemple #7
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\Window1.xaml"
     ((CourseTaskProject.Window1)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 13 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Exit_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 22 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonNewCourse_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 44 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonNewCourse_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 53 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonEditCourse_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 60 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonViewCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     
     #line 67 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonDeleteCourse_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 73 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonNewStudent_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     
     #line 80 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonEditStudent_Click);
     
     #line default
     #line hidden
     return;
     case 10:
     
     #line 87 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonDeleteStudent_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     
     #line 93 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonManageGroup_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     
     #line 99 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonAddCourse_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     
     #line 105 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCancelCourse_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     
     #line 113 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonClearCourse_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     
     #line 120 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitManage_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     
     #line 126 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonAddStudent_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     
     #line 131 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonCancelStudent_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.ribbonControl = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target));
     return;
     case 19:
     this.courseTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 154 "..\..\Window1.xaml"
     this.courseTab.Selected += new System.Windows.RoutedEventHandler(this.CourseTab_Select);
     
     #line default
     #line hidden
     return;
     case 20:
     this.studentTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 175 "..\..\Window1.xaml"
     this.studentTab.Selected += new System.Windows.RoutedEventHandler(this.StudentTab_Select);
     
     #line default
     #line hidden
     return;
     case 21:
     this.NewCourseTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     return;
     case 22:
     this.ClearCourseField = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target));
     return;
     case 23:
     this.ManageGroupTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     return;
     case 24:
     this.NewStudentTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     return;
     case 25:
     this.CourseDetailTab = ((Microsoft.Windows.Controls.Ribbon.RibbonContextualTabGroup)(target));
     return;
     case 26:
     this.RegistedCourseTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 247 "..\..\Window1.xaml"
     this.RegistedCourseTab.Selected += new System.Windows.RoutedEventHandler(this.RegisterCourseTab_Select);
     
     #line default
     #line hidden
     return;
     case 27:
     
     #line 257 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonAddStudentByCode_Click);
     
     #line default
     #line hidden
     return;
     case 28:
     
     #line 266 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonDeleteOfCourse_Click);
     
     #line default
     #line hidden
     return;
     case 29:
     
     #line 280 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 30:
     this.AssessmentTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 288 "..\..\Window1.xaml"
     this.AssessmentTab.Selected += new System.Windows.RoutedEventHandler(this.AssessmentTab_Select);
     
     #line default
     #line hidden
     return;
     case 31:
     
     #line 300 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 32:
     this.ReportTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 306 "..\..\Window1.xaml"
     this.ReportTab.Selected += new System.Windows.RoutedEventHandler(this.ReportTab_Select);
     
     #line default
     #line hidden
     return;
     case 33:
     
     #line 317 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 34:
     this.ManageAssessmentTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 323 "..\..\Window1.xaml"
     this.ManageAssessmentTab.Selected += new System.Windows.RoutedEventHandler(this.ManageAssessmentTab_Select);
     
     #line default
     #line hidden
     return;
     case 35:
     
     #line 333 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 36:
     this.RegisterStudenTab = ((Microsoft.Windows.Controls.Ribbon.RibbonTab)(target));
     
     #line 341 "..\..\Window1.xaml"
     this.RegisterStudenTab.Selected += new System.Windows.RoutedEventHandler(this.RegisterStudenTab_Select);
     
     #line default
     #line hidden
     return;
     case 37:
     
     #line 353 "..\..\Window1.xaml"
     ((Microsoft.Windows.Controls.Ribbon.RibbonCommand)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.RibbonExitCourseDetail_Click);
     
     #line default
     #line hidden
     return;
     case 38:
     this.MainContent = ((System.Windows.Controls.Grid)(target));
     return;
     }
     this._contentLoaded = true;
 }