'宣言 Public Class DockableGroupPane Inherits DockablePaneBase Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.UltraWinTabs.ITabItem
public class DockableGroupPane : DockablePaneBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.UltraWinTabs.ITabItem
DockableGroupPane は、DockablePaneBase インスタンスを格納するためのコンテナーです。グループペインには DockableControlPane または DockableGroupPane を格納できます。グループに含まれているペインは Panes プロパティからアクセスできます。ChildPaneStyle は、ペインの表示方法を変更するために使用されます。
GroupSettings は、GroupSettings オブジェクトのインスタンスを返します。このオブジェクトは、グループの外観と動作に作用するプロパティを持っています。DefaultPaneSettings はデフォルトの外観と子ペインの動作に影響する PaneSettings インスタンスを返します。子ペインの DockablePaneBase.Settings に明示的に設定されていないプロパティは、このオブジェクトを使用して解決されます。
Pin、Unpin、および DockablePaneBase.ToggleDockState は、子ペインの状態に影響します。たとえば、Unpin メソッドが呼び出されると、すべての DockableControlPane 子孫 (Panes コレクションに含まれる子ペインとこれらのペイン オブジェクトの子) のピン固定が解除され、DockablePaneBase.DockAreaPane の DockAreaPane.DockedLocation に基づいて、UnpinnedTabArea に表示されます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub CreateGroups(ByVal manager As UltraDockManager) ' Create a control pane that will contain the tree control. ' the key for the pane is 'treeSolutions'. the key can be used later ' to access the control from the control panes collection: ' e.g. dim paneSolution as DockableControlPane = manager.ControlPanes("treeSolution") Dim paneSolution As DockableControlPane = New DockableControlPane("treeSolution") ' Specify the control that it should contain paneSolution.Control = Me.treeView1 ' Specify the text for the caption of the pane. paneSolution.Text = "Solution Explorer - Current Project" ' Specify a different text for the tab item when the pane is in ' a tab group or has been unpinned. if one is not specified, the ' the 'Text' property is used. to get the text that will be displayed ' for the tab item, you can use the 'TextTabResolved' property of ' the pane paneSolution.TextTab = "Solution Explorer" ' Initialize the tooltip properties for the pane paneSolution.ToolTipCaption = "Solution Explorer - Application" paneSolution.ToolTipTab = "Displays the solution information for the current application." ' Now create another control pane to contain the other tree control. ' the constructor may be passed the control as well as the key Dim paneClassView As DockableControlPane = New DockableControlPane("treeClassView", Me.TreeView2) ' Initialize the text. if you check the TextTabResolved, it ' too will return "Class View" paneClassView.Text = "Class View" ' Create a new tab group that will contain our tree controls Dim tabGroup As DockableGroupPane = New DockableGroupPane() ' Now lets add the control panes to a tab group tabGroup.Panes.AddRange(New DockablePaneBase() {paneSolution, paneClassView}) ' The child pane style may be initialized before the panes ' are added to the group or anytime after tabGroup.ChildPaneStyle = ChildPaneStyle.TabGroup ' Now that the panes are added to the group, we can initialize ' which tab should be selected. note, this could change if the ' other control gets focus since activating a control will change ' the selected tab paneClassView.IsSelectedTab = True ' alternatively we could set the SelectedTabIndex of the group ' e.g. tabGroup.SelectedTabIndex = paneClassView.Index ' Now we'll create a control pane to contain our listview Dim paneList As DockableControlPane = New DockableControlPane("propertyList", Me.listView1) paneList.Text = "Properties" ' Now we will position this controls on the form ' ' Create a dock area pane that is docked on the right side of the container Dim dockArea As DockAreaPane = New DockAreaPane(DockedLocation.DockedRight) ' Add the tab group and the paneList control pane as siblings in the ' new dock area. notice that the 'AddRange' method takes an array of ' 'DockablePaneBase' instances and therefore will accept any combination ' of DockableControlPane or DockableGroupPane instances dockArea.Panes.AddRange(New DockablePaneBase() {tabGroup, paneList}) ' We want our dock area to show the tab group and list control ' with a horizontal split between them dockArea.ChildPaneStyle = ChildPaneStyle.HorizontalSplit ' Initialize the dock area to be 200 pixels wide but leave ' the default height since its going to be control by the height ' of the HostControl - the form or usercontrol dockArea.Size = New Size(200, -1) ' Lastly, add the dock area to the components dock areas collection manager.DockAreas.Add(dockArea) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void CreateGroups( UltraDockManager manager ) { // Create a control pane that will contain the tree control. // the key for the pane is 'treeSolutions'. the key can be used later // to access the control from the control panes collection: // e.g. DockableControlPane paneSolution = manager.ControlPanes["treeSolution"]; DockableControlPane paneSolution = new DockableControlPane("treeSolution"); // Specify the control that it should contain paneSolution.Control = this.treeView1; // Specify the text for the caption of the pane. paneSolution.Text = "Solution Explorer - Current Project"; // Specify a different text for the tab item when the pane is in // a tab group or has been unpinned. if one is not specified, the // the 'Text' property is used. to get the text that will be displayed // for the tab item, you can use the 'TextTabResolved' property of // the pane paneSolution.TextTab = "Solution Explorer"; // Initialize the tooltip properties for the pane paneSolution.ToolTipCaption = "Solution Explorer - Application"; paneSolution.ToolTipTab = "Displays the solution information for the current application."; // Now create another control pane to contain the other tree control. // the constructor may be passed the control as well as the key DockableControlPane paneClassView = new DockableControlPane("treeClassView", this.treeView2); // Initialize the text. if you check the TextTabResolved, it // too will return "Class View" paneClassView.Text = "Class View"; // Create a new tab group that will contain our tree controls DockableGroupPane tabGroup = new DockableGroupPane(); // Now lets add the control panes to a tab group tabGroup.Panes.AddRange( new DockablePaneBase[] { paneSolution, paneClassView } ); // The child pane style may be initialized before the panes // are added to the group or anytime after tabGroup.ChildPaneStyle = ChildPaneStyle.TabGroup; // Now that the panes are added to the group, we can initialize // which tab should be selected. note, this could change if the // other control gets focus since activating a control will change // the selected tab paneClassView.IsSelectedTab = true; // alternatively we could set the SelectedTabIndex of the group // e.g. tabGroup.SelectedTabIndex = paneClassView.Index; // Now we'll create a control pane to contain our listview DockableControlPane paneList = new DockableControlPane("propertyList", this.listView1); paneList.Text = "Properties"; // Now we will position this controls on the form // // Create a dock area pane that is docked on the right side of the container DockAreaPane dockArea = new DockAreaPane( DockedLocation.DockedRight ); // Add the tab group and the paneList control pane as siblings in the // new dock area. notice that the 'AddRange' method takes an array of // 'DockablePaneBase' instances and therefore will accept any combination // of DockableControlPane or DockableGroupPane instances dockArea.Panes.AddRange( new DockablePaneBase[] { tabGroup, paneList } ); // We want our dock area to show the tab group and list control // with a horizontal split between them dockArea.ChildPaneStyle = ChildPaneStyle.HorizontalSplit; // Initialize the dock area to be 200 pixels wide but leave // the default height since its going to be control by the height // of the HostControl - the form or usercontrol dockArea.Size = new Size( 200, -1 ); // Lastly, add the dock area to the components dock areas collection manager.DockAreas.Add( dockArea ); }