バージョン

DockablePaneBase クラス

ドッキング可能ペインの抽象基本クラス。
シンタックス
'宣言
 
Public MustInherit Class DockablePaneBase 
   Inherits Infragistics.Shared.KeyedSubObjectBase
   Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.UltraWinTabs.ITabItem 
public abstract class DockablePaneBase : Infragistics.Shared.KeyedSubObjectBase, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Win.UltraWinTabs.ITabItem  
解説

DockablePaneBase クラスはすべてのペイン オブジェクトに共通の機能を実装しています。ペイン オブジェクトは、UltraDockManager によって使用される基本コンテナー クラスです。

Settings プロパティはペイン インスタンスの動作と外観に影響する PaneSettings オブジェクトを返します。解決されたプロパティ値へのアクセスを可能にするために SettingsResolvedPaneSettingsResolved インスタンスを返します。

Text プロパティは、ペインのキャプションを決定します。PaneCaptionUIElement でこの文字列が使用されますが、TextTab プロパティが設定されていない場合にはタブで使用することもできます。

このクラスはペインがドッキングされる場所を変更するためのメソッドを実装します。ペインのドッキングされた状態とフローディング状態を切り替えるために ToggleDockState メソッドが使用されます。つまり、ペインが現在ドッキングされているが以前はフローティングしていた場合、このメソッドを呼び出すとペインをその位置に戻します。ペインを決してフローティングしたことがない場合、新しい DockAreaPane に表示されます。このメソッドは、ユーザーがペイン キャプション、タブまたはスライディング グループ要素をダブルクリックする時に発生するデフォルトの動作を模倣します。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock

Private Sub CreateDockManagerPanes(ByVal manager As UltraDockManager)
    ' this code assumes that there is a treeview (treeview1),
    ' listview (listview1) and rich textbox (richtext1) on 
    ' the form

    ' create control panes to contain the listview
    ' and tree view
    Dim paneTree As DockableControlPane = New DockableControlPane("tree", "MS Treeview", Me.treeView1)
    Dim paneList As DockableControlPane = New DockableControlPane()

    paneList.Key = "list"
    paneList.Text = "MS Listview"
    paneList.Control = Me.listView1

    ' create a dock area to contain the control panes
    Dim dockAreaLeft As DockAreaPane = New DockAreaPane(DockedLocation.DockedLeft)

    ' add the control panes to the dock area
    dockAreaLeft.Panes.Add(paneTree)
    dockAreaLeft.Panes.Add(paneList)

    ' display the panes in a tab group
    dockAreaLeft.ChildPaneStyle = ChildPaneStyle.TabGroup

    ' initialize the size of the dock area
    dockAreaLeft.Size = New Size(200, 200)

    ' let the tabs autosize to the tab caption
    dockAreaLeft.GroupSettings.TabSizing = Infragistics.Win.UltraWinTabs.TabSizing.AutoSize

    ' unpin the panes
    dockAreaLeft.Unpin()

    ' now create the control pane to contain the richtext
    Dim paneText As DockableControlPane = New DockableControlPane("text", "MS RichText", Me.richTextBox1)

    ' create a dock area on the right to contain the rich text
    Dim dockAreaFloat As DockAreaPane = New DockAreaPane(DockedLocation.DockedRight)

    ' initialize the size of the dock area
    dockAreaFloat.Size = New Size(120, 200)

    ' contain the rich text pane in the dock area
    dockAreaFloat.Panes.Add(paneText)

    ' finally, add the dock areas to the dock manager
    manager.DockAreas.AddRange( _
        New DockAreaPane() {dockAreaLeft, dockAreaFloat})

    ' float the rich text dock area but give it a different
    ' floating size
    dockAreaFloat.Float(False, New Rectangle(400, 400, 200, 150))
End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;

private void CreateDockManagerPanes( UltraDockManager manager )
{
	// this code assumes that there is a treeview (treeview1),
	// listview (listview1) and rich textbox (richtext1) on 
	// the form
	
	// create control panes to contain the listview
	// and tree view
	DockableControlPane paneTree = new DockableControlPane("tree", "MS Treeview", this.treeView1);
	DockableControlPane paneList = new DockableControlPane();

	paneList.Key = "list";
	paneList.Text = "MS Listview";
	paneList.Control = this.listView1;

	// create a dock area to contain the control panes
	DockAreaPane dockAreaLeft = new DockAreaPane(DockedLocation.DockedLeft);

	// add the control panes to the dock area
	dockAreaLeft.Panes.Add( paneTree );
	dockAreaLeft.Panes.Add( paneList );

	// display the panes in a tab group
	dockAreaLeft.ChildPaneStyle = ChildPaneStyle.TabGroup;

	// initialize the size of the dock area
	dockAreaLeft.Size = new Size(200, 200);

	// let the tabs autosize to the tab caption
	dockAreaLeft.GroupSettings.TabSizing = Infragistics.Win.UltraWinTabs.TabSizing.AutoSize;

	// unpin the panes
	dockAreaLeft.Unpin();

	// now create the control pane to contain the richtext
	DockableControlPane paneText = new DockableControlPane("text", "MS RichText", this.richTextBox1);

	// create a dock area on the right to contain the rich text
	DockAreaPane dockAreaFloat = new DockAreaPane(DockedLocation.DockedRight);

	// initialize the size of the dock area
	dockAreaFloat.Size = new Size(120, 200);

	// contain the rich text pane in the dock area
	dockAreaFloat.Panes.Add( paneText );

	// finally, add the dock areas to the dock manager
	manager.DockAreas.AddRange(
		new DockAreaPane[] { dockAreaLeft, dockAreaFloat } );

	// float the rich text dock area but give it a different
	// floating size
	dockAreaFloat.Float(false, new Rectangle(400, 400, 200, 150));
}
参照