語言

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 。

傳回

與指定名稱相關的元素。

備註

欲了解更多資訊,請參閱 WPF XAML Namescopes 中的「XAML Namescopes in Styles and Templates」。

適用於