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

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

その他のバージョンについては、以下の情報を参照してください。
UIElementCollection クラス
UIElements の順序の付いたコレクションを表します。

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

Visual Basic (宣言)
Public Class UIElementCollection
	Implements IList, ICollection, IEnumerable
Visual Basic (使用法)
Dim instance As UIElementCollection
C#
public class UIElementCollection : IList, ICollection, IEnumerable
C++
public ref class UIElementCollection : IList, ICollection, IEnumerable
J#
public class UIElementCollection implements IList, ICollection, 
	IEnumerable
JScript
public class UIElementCollection implements IList, ICollection, 
	IEnumerable
XAML
このマネージ クラスは XAML では使用できません。

Panel 基本クラスでは、UIElementCollection を使用して子要素のコレクションが表されます。UIElementCollection で定義されるメソッドとプロパティは、Panel 子要素を操作するための共通機能セットを定義し、Panel から派生したすべてのオブジェクトに影響します。

UIElementCollection には、自身のコンテキスト (クラス) に対するアフィニティがあります。このコレクションへのアクセスは、このコレクションが属する Panel のコンテキストから行う必要があります。

Add メソッドを使用して、親 StackPanel に子コンテンツを追加する方法を次の例に示します。この作業には、UIElementCollection 型の Children プロパティを使用します。サンプル全体については、「要素の使用のサンプル」を参照してください。

C#
void AddButton(object sender, MouseButtonEventArgs e)
{
    sp1.Children.Clear();
    btn = new Button();
    btn.Content = "New Button";
    sp1.Children.Add(btn);
}
System.Object
  System.Windows.Controls.UIElementCollection
この型の public static (Visual Basicでは共有) メンバはすべて,スレッド セーフです。インスタンス メンバの場合は,スレッド セーフであるとは限りません。

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