UIElementCollection.Item[Int32] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the UIElement stored at the zero-based index position of the UIElementCollection.
public:
virtual property System::Windows::UIElement ^ default[int] { System::Windows::UIElement ^ get(int index); void set(int index, System::Windows::UIElement ^ value); };
public virtual System.Windows.UIElement this[int index] { get; set; }
member this.Item(int) : System.Windows.UIElement with get, set
Default Public Overridable Property Item(index As Integer) As UIElement
Parameters
Property Value
A UIElement at the specified index
position.
Examples
The following example uses the Item[] property to identify the child element at a specified index position.
void GetItem(object sender, RoutedEventArgs e)
{
TextBlock txt2 = new TextBlock();
sp1.Children.Add(txt2);
txt2.Text = "UIElement at Index position [0] is " + sp1.Children[0].ToString();
}
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET