クリックして評価とフィードバックをお寄せください
MSDN
MSDN ライブラリ
.NET 開発
以前のバージョン
.NET Framework SDK 2.0
System.Windows.Controls
Panel クラス
Panel プロパティ
 Children プロパティ

  低帯域幅での表示をオンにする
このページは次のバージョンについて記述しています。
Microsoft Visual Studio 2005/.NET Framework 2.0

その他のバージョンについては、以下の情報を参照してください。
Panel.Children プロパティ
この Panel の子要素の UIElementCollection を取得します。

名前空間: System.Windows.Controls
アセンブリ: PresentationFramework (presentationframework.dll 内)
XML 名前空間 :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

Visual Basic (宣言)
Public ReadOnly Property Children As UIElementCollection
Visual Basic (使用法)
Dim instance As Panel
Dim value As UIElementCollection

value = instance.Children
C#
public UIElementCollection Children { get; }
C++
public:
property UIElementCollection^ Children {
	UIElementCollection^ get ();
}
J#
/** @property */
public UIElementCollection get_Children ()
JScript
public function get Children () : UIElementCollection
XAML コンテンツ要素の使用
<object>
  <UIElementCollection .../>
</object>

プロパティ値

UIElementCollection。既定値は空の UIElementCollection です。

コンテンツ モデル : Panel は、子コンテンツに強力なコンテンツ モデルを適用します。Panel 要素の Children コレクションを構成できるのは、UIElement オブジェクトだけです。UIElement の子を暗黙的に Panel に追加すると、Panel 要素の UIElementCollection に追加されます。

派生 Panel クラスではこのコレクションを使用せず、InternalChildren コレクションを使用してください。

このプロパティは、Panel がデータ バインドされている場合は null 参照 (Visual Basic では Nothing) を返します。

Children プロパティを使用して UIElement の子を Panel 要素に追加する方法を次のコード例に示します。

C#
StackPanel myStackPanel = new StackPanel();
Button myButton = new Button();
myButton.Content = "Press me";
myStackPanel.Children.Add(myButton);

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

.NET Framework

サポート対象 : 3.0
コミュニティ コンテンツ   コミュニティ コンテンツとは
新しいコンテンツの追加 RSS  注釈
Processing
© 2009 Microsoft Corporation. All rights reserved. 使用条件  |  商標  |  プライバシー
Page view tracker