'宣言 Public Property NavigationButtonStyle As NavigationButtonStyle
public NavigationButtonStyle NavigationButtonStyle {get; set;}
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolbars Private Sub UltraButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton2.Click ' create a new task pane toolbar and add it to ' the toolbars collection of the manager Dim taskPane As New UltraTaskPaneToolbar("TaskPaneDemo") taskPane.Text = "TaskPane" Me.UltraToolbarsManager1.Toolbars.Add(taskPane) ' create new task pane tools that will represents items ' in the task pane toolbar menu Dim dayTool As New TaskPaneTool("dayview") Dim weekTool As New TaskPaneTool("weekview") Dim monthTool As New TaskPaneTool("monthview") ' initialize their captions dayTool.SharedProps.Caption = "Day" weekTool.SharedProps.Caption = "Week" monthTool.SharedProps.Caption = "Month" ' associate a control that will be displayed when the tool ' is selected dayTool.Control = Me.ultraDayView1 weekTool.Control = Me.ultraWeekView1 monthTool.Control = Me.ultraMonthViewSingle1 ' create the root level tools Me.UltraToolbarsManager1.Tools.AddRange(New ToolBase() {dayTool, weekTool, monthTool}) ' add the tools to the task pane toolbar taskPane.Tools.AddTool("dayview") taskPane.Tools.AddTool("weekview") taskPane.Tools.AddTool("monthview") ' the UltraTaskPaneToolbar is a derived toolbar so much ' of the properties that can be used for an UltraToolbar ' can be used here as well. ' e.g. dock the toolbar to the right taskPane.DockedPosition = DockedPosition.Right ' by default have the controls resize to fill the available ' content area of the task pane taskPane.ToolResizeMode = TaskPaneToolResizeMode.AutoSizeBothDimensions ' when the home button is clicked, the month ' task pane tool should be selected taskPane.HomeTaskPaneTool = taskPane.Tools("monthView") ' start with the week view tool being selected taskPane.SelectedTaskPaneTool = taskPane.Tools("weekView") ' always show the home button taskPane.ShowHomeButton = DefaultableBoolean.True ' instead of using the default navigation style of history ' where back and forward iterate the items that have already ' been viewed, use the arrow buttons to just move back ' and forth through the list taskPane.NavigationButtonStyle = NavigationButtonStyle.Linear ' the 'NavigationMenuSettings' is used to affect the appearance ' of the menu that display the available task pane tools in the ' ultrataskpane toolbar taskPane.NavigationMenuSettings.SideStripText = "Schedule" taskPane.NavigationMenuSettings.IsSideStripVisible = DefaultableBoolean.True ' allow the end user to resize the task pane taskPane.AllowResize = True ' however, restrict the minimum extent of the content area - ' i.e. the minimum width when docked vertically and the minimum ' height when docked horizontally taskPane.DockedContentExtentMin = 125 taskPane.FloatingContentSizeMin = New Size(150, 200) ' start the docked content area at 150 pixels taskPane.DockedContentExtent = 150 ' allow the end user to dropdown a list of the tools. to restrict ' the users to using the navigation buttons, this may be set to ' false. taskPane.AllowNavigationViaMenu = DefaultableBoolean.True ' Many of the 'Settings' apply to the header area of the ' task pane toolbar. ' e.g. taskPane.Settings.Appearance ' Others affect the task pane toolbar itself. ' e.g. to prevent the task pane from being hidden taskPane.Settings.AllowHiding = DefaultableBoolean.False ' to prevent the task pane from being docked to the right taskPane.Settings.AllowDockLeft = DefaultableBoolean.False End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinToolbars; private void ultraButton2_Click(object sender, System.EventArgs e) { // create a new task pane toolbar and add it to // the toolbars collection of the manager UltraTaskPaneToolbar taskPane = new UltraTaskPaneToolbar("TaskPaneDemo"); taskPane.Text = "TaskPane"; this.ultraToolbarsManager1.Toolbars.Add(taskPane); // create new task pane tools that will represents items // in the task pane toolbar menu TaskPaneTool dayTool = new TaskPaneTool("dayview"); TaskPaneTool weekTool = new TaskPaneTool("weekview"); TaskPaneTool monthTool = new TaskPaneTool("monthview"); // initialize their captions dayTool.SharedProps.Caption = "Day"; weekTool.SharedProps.Caption = "Week"; monthTool.SharedProps.Caption = "Month"; // associate a control that will be displayed when the tool // is selected dayTool.Control = this.ultraDayView1; weekTool.Control = this.ultraWeekView1; monthTool.Control = this.ultraMonthViewSingle1; // create the root level tools this.ultraToolbarsManager1.Tools.AddRange( new ToolBase[] { dayTool, weekTool, monthTool } ); // add the tools to the task pane toolbar taskPane.Tools.AddTool("dayview"); taskPane.Tools.AddTool("weekview"); taskPane.Tools.AddTool("monthview"); // the UltraTaskPaneToolbar is a derived toolbar so much // of the properties that can be used for an UltraToolbar // can be used here as well. // e.g. dock the toolbar to the right taskPane.DockedPosition = DockedPosition.Right; // by default have the controls resize to fill the available // content area of the task pane taskPane.ToolResizeMode = TaskPaneToolResizeMode.AutoSizeBothDimensions; // when the home button is clicked, the month // task pane tool should be selected taskPane.HomeTaskPaneTool = taskPane.Tools["monthView"]; // start with the week view tool being selected taskPane.SelectedTaskPaneTool = taskPane.Tools["weekView"]; // always show the home button taskPane.ShowHomeButton = DefaultableBoolean.True; // instead of using the default navigation style of history // where back and forward iterate the items that have already // been viewed, use the arrow buttons to just move back // and forth through the list taskPane.NavigationButtonStyle = NavigationButtonStyle.Linear; // the 'NavigationMenuSettings' is used to affect the appearance // of the menu that display the available task pane tools in the // ultrataskpane toolbar taskPane.NavigationMenuSettings.SideStripText = "Schedule"; taskPane.NavigationMenuSettings.IsSideStripVisible = DefaultableBoolean.True; // allow the end user to resize the task pane taskPane.AllowResize = true; // however, restrict the minimum extent of the content area - // i.e. the minimum width when docked vertically and the minimum // height when docked horizontally taskPane.DockedContentExtentMin = 125; taskPane.FloatingContentSizeMin = new Size(150,200); // start the docked content area at 150 pixels taskPane.DockedContentExtent = 150; // allow the end user to dropdown a list of the tools. to restrict // the users to using the navigation buttons, this may be set to // false. taskPane.AllowNavigationViaMenu = DefaultableBoolean.True; // Many of the 'Settings' apply to the header area of the // task pane toolbar. // e.g. taskPane.Settings.Appearance // Others affect the task pane toolbar itself. // e.g. to prevent the task pane from being hidden taskPane.Settings.AllowHiding = DefaultableBoolean.False; // to prevent the task pane from being docked to the right taskPane.Settings.AllowDockLeft = DefaultableBoolean.False; }