FrameworkTemplate.FindName(String, FrameworkElement) 方法

定義

尋找與這個樣板內定義之指定名稱相關聯的項目。

public:
 System::Object ^ FindName(System::String ^ name, System::Windows::FrameworkElement ^ templatedParent);
public object FindName (string name, System.Windows.FrameworkElement templatedParent);
member this.FindName : string * System.Windows.FrameworkElement -> obj
Public Function FindName (name As String, templatedParent As FrameworkElement) As Object

參數

name
String

字串名稱。

templatedParent
FrameworkElement

套用這個樣板之 FrameworkElement 的內容。

傳回

Object

與指定名稱相關聯的項目。

備註

For more information, see "XAML Namescopes in Styles and Templates" in WPF XAML Namescopes.

適用於