예제 #1
0
		public static void SetSchema(DockPanel dockPanel, Extender.Schema schema)
		{
			if (schema == Extender.Schema.Default)
			{
				dockPanel.Extender.AutoHideTabFactory = null;
				dockPanel.Extender.DockPaneTabFactory = null;
				dockPanel.Extender.AutoHideStripFactory = null;
				dockPanel.Extender.DockPaneCaptionFactory = null;
				dockPanel.Extender.DockPaneStripFactory = null;
			}
			else if (schema == Extender.Schema.Override)
			{
				dockPanel.Extender.AutoHideTabFactory = null;
				dockPanel.Extender.DockPaneTabFactory = null;
				dockPanel.Extender.DockPaneCaptionFactory = null;
				dockPanel.Extender.AutoHideStripFactory = new AutoHideStripOverrideFactory();
				dockPanel.Extender.DockPaneStripFactory = new DockPaneStripOverrideFactory();
			}
			else if (schema == Extender.Schema.FromBase)
			{
				dockPanel.Extender.AutoHideTabFactory = new AutoHideTabFromBaseFactory();
				dockPanel.Extender.DockPaneTabFactory = new DockPaneTabFromBaseFactory();
				dockPanel.Extender.AutoHideStripFactory = new AutoHideStripFromBaseFactory();
				dockPanel.Extender.DockPaneCaptionFactory = new DockPaneCaptionFromBaseFactory();
				dockPanel.Extender.DockPaneStripFactory = new DockPaneStripFromBaseFactory();
			}
		}
        private void SetSchema(object sender, System.EventArgs e)
        {
            CloseAllContents();

            if (sender == menuItemSchemaVS2005)
            {
                Extender.SetSchema(dockPanel, Extender.Schema.VS2005);
            }
            else if (sender == menuItemSchemaVS2003)
            {
                Extender.SetSchema(dockPanel, Extender.Schema.VS2003);
            }

            menuItemSchemaVS2005.Checked = (sender == menuItemSchemaVS2005);
            menuItemSchemaVS2003.Checked = (sender == menuItemSchemaVS2003);
        }