バージョン

コンテンツを ContentPane に追加

ContentPane オブジェクトは HeaderedContentControl から派生しているので、このオブジェクトの使用は Microsoft Windows® Presentation Foundation のヘッダー付きコンテンツ コントロールに似ています。Windows Presentation Foundation のコンテンツ コントロールと同じように、コンテンツ ペインの Content プロパティをオブジェクトのインスタンスに設定できます。多くの場合、StackPanel などのレイアウト コンテナをルート要素として使用します (レイアウト コンテナに補足要素を追加する)。

コンテンツ ペインの Content プロパティを設定できるだけでなく、ペインのヘッダーのテキストを表示するために Header プロパティを設定することもできます。コンテンツ ペインのピン固定を解除および隠すと、タブ ヘッダーが自動的にヘッダー テキストを表示します。コンテンツ ペインの TabHeader プロパティを設定して、このデフォルトの動作をオーバーライドできます。

コンテンツ ペインのドッキング関連の動作を制限する以下のプロパティも見つかります。

以下のコード例は、コンテンツをコンテンツ ペインに追加する方法を示します。

コンテンツを xamdockmanager の contentpane に追加

XAML の場合:

...
<igDock:XamDockManager Name="xamDockManager1">
    <igDock:XamDockManager.Panes>
        <igDock:SplitPane>
            <igDock:ContentPane Header="Pane 1">
                <StackPanel>
                    <Button Content="Button 1" />
                    <Button Content="Button 2" />
                    <Button Content="Button 3" />
                    <Button Content="Button 4" />
                </StackPanel>
            </igDock:ContentPane>
        </igDock:SplitPane>
    </igDock:XamDockManager.Panes>
</igDock:XamDockManager>
...

Visual Basic の場合:

Imports Infragistics.Windows.DockManager
...
'SplitPane オブジェクトを作成します
Dim splitPane1 As New SplitPane()
' xamDockManager の Panes コレクションに SplitPane を追加します。
Me.xamDockManager1.Panes.Add(splitPane1)
'ContentPane を作成し、その Header プロパティを設定します。
Dim buttonPane As New ContentPane()
buttonPane.Header = "Pane 1"
' SplitPane の Panes コレクションに ContentPane を追加します。
splitPane1.Panes.Add(buttonPane)
' StackPanel を作成します。
Dim panel As New StackPanel()
'ContentPane の Content プロパティをパネルに設定します。
buttonPane.Content = panel
'4 つの Button コントロールを作成し、StackPanel の Children コレクションに追加します。
For i As Integer = 1 To 4
    Dim b As New Button()
    b.Content = "Button " + i.ToString()
    panel.Children.Add(b)
Next
...

C# の場合:

using Infragistics.Windows.DockManager;
...
//SplitPane オブジェクトを作成します
SplitPane splitPane1 = new SplitPane();
//xamDockManager の Panes コレクションに SplitPane を追加します。
this.xamDockManager1.Panes.Add(splitPane1);
//ContentPane を作成し、その Header プロパティを設定します。
ContentPane buttonPane = new ContentPane();
buttonPane.Header = "Pane 1";
//SplitPane の Panes コレクションに ContentPane を追加します。
splitPane1.Panes.Add(buttonPane);
//StackPanel を作成します。
StackPanel panel = new StackPanel();
//ContentPane の Content プロパティをパネルに設定します。
buttonPane.Content = panel;
//4 つの Button コントロールを作成し、StackPanel の Children コレクションに追加します。
for (int i = 1; i < 5; i++)
{
    Button b = new Button();
    b.Content = "Button " + i.ToString();
    panel.Children.Add(b);
}
....