Exemplo n.º 1
0
        private void myRibbon_RibbonTabItemSelected(object sender, Infragistics.Windows.Ribbon.Events.RibbonTabItemSelectedEventArgs e)
        {
            if (root != null)
            {
                root.Content = null;

                if (e.NewSelectedRibbonTabItem.Name == "HomeTab")
                {
                    if (UIContext.License != null)
                    {
                        ProjectForm projectForm = new ProjectForm();
                        projectForm.License = UIContext.License;
                        root.Content = projectForm;
                    }
                    else
                    {
                        WelcomeScreenForm welcomeScreenForm = new WelcomeScreenForm();
                        root.Content = welcomeScreenForm;
                    }
                }
                else if (e.NewSelectedRibbonTabItem.Name == "ProductsTab")
                {
                    ProductsScreen productsScreen = new ProductsScreen();
                    root.Content = productsScreen;
                }
                else if (e.NewSelectedRibbonTabItem.Name == "ServicesTab")
                {

                }
            }
        }
Exemplo n.º 2
0
		private void ribbon_SelectedTabChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
		{
			if (e.AddedItems != null && e.AddedItems.Count == 1)
			{
				if (((RibbonTabItem)e.AddedItems[0]).Name == "homeTabItem")
				{
					WelcomeScreenForm welcomeScreenForm = new WelcomeScreenForm();
					root.Content = welcomeScreenForm;
				}
				else if (((RibbonTabItem)e.AddedItems[0]).Name == "productsTabItem")
				{
					if (_productsScreen == null)
						_productsScreen = new ProductsScreen();

					root.Content = _productsScreen;
				}
				else if (((RibbonTabItem)e.AddedItems[0]).Name == "servicesTabItem")
				{
					if (_servicesScreen == null)
						_servicesScreen = new ServicesScreen();

					root.Content = _servicesScreen;
				}

				else if (((RibbonTabItem)e.AddedItems[0]).Name == "projectTabItem")
				{
					if (UIContext.License != null)
					{
						ProjectForm projectForm = new ProjectForm();
						projectForm.License = UIContext.License;
						root.Content = projectForm;
					}
				}
			}
		}