FrameworkTemplate.VisualTree FrameworkTemplate.VisualTree FrameworkTemplate.VisualTree FrameworkTemplate.VisualTree Property

定義

取得或設定樣板的根節點。Gets or sets the root node of the template.

public:
 property System::Windows::FrameworkElementFactory ^ VisualTree { System::Windows::FrameworkElementFactory ^ get(); void set(System::Windows::FrameworkElementFactory ^ value); };
public System.Windows.FrameworkElementFactory VisualTree { get; set; }
member this.VisualTree : System.Windows.FrameworkElementFactory with get, set
Public Property VisualTree As FrameworkElementFactory

屬性值

備註

XAML 屬性項目用法XAML Property Element Usage

<object>  
  <VisualTreeRootNode > VisualTreeNodeContents  
  </VisualTreeRootNode >  
</object>  

XAML 值XAML Values

VisualTreeRootNodeVisualTreeRootNode
單一 XAML 元素, 做為子FrameworkTemplate類別的直屬子系。A single XAML element as the immediate child of the FrameworkTemplate subclass. 範本必須有單一根節點。Templates must have a single root node. 為了產生有用的範本, 選擇為VisualTreeRootNode的元素應該支援本身的內容模型, 通常是支援多個子項目的模型。In order to generate a useful template, the element chosen as VisualTreeRootNode is expected to support a content model of its own, often a model that supports multiple child elements.

VisualTreeNodeContentsVisualTreeNodeContents
完成預定範本的一或多個元素。One or more elements that complete the intended template. 如果選擇做為VisualTreeRootNode的元素僅支援單一子系, 則只能有一個宣告為VisualTreeNodeContents的元素。If the element chosen as VisualTreeRootNode only supports a single child, then there can only be one element declared as VisualTreeNodeContents. 如果所選的VisualTreeRootNode支援文字內容屬性, 則也可能 (但不常見) 提供文字內容。It is also possible (though uncommon) to provide text content if the chosen VisualTreeRootNode supports a text content property.

適用於