InkCanvas.Children 屬性

定義

擷取 InkCanvas 的子項目。

public:
 property System::Windows::Controls::UIElementCollection ^ Children { System::Windows::Controls::UIElementCollection ^ get(); };
public System.Windows.Controls.UIElementCollection Children { get; }
member this.Children : System.Windows.Controls.UIElementCollection
Public ReadOnly Property Children As UIElementCollection

屬性值

位在 InkCanvas 上的子項目集合。

範例

下列範例會將 加入 TextBlockInkCanvas 至 。

textBlock1 = new TextBlock();
textBlock1.Text = "TextBlock content";
Canvas.SetTop(textBlock1, 100);
Canvas.SetLeft(textBlock1, 100);
inkCanvas1.Children.Add(textBlock1);
textBlock1 = New TextBlock()
textBlock1.Text = "TextBlock content"
Canvas.SetTop(textBlock1, 100)
Canvas.SetLeft(textBlock1, 100)
inkCanvas1.Children.Add(textBlock1)

備註

XAML 屬性項目用法

<object>  
  OneOrMoreUIElements  
</object>  

XAML 值

OneOrMoreUIElements
一或多個 UIElement 物件。

適用於