FrameworkElementFactory FrameworkElementFactory FrameworkElementFactory FrameworkElementFactory Class

定義

支援建立範本。Supports the creation of templates.

public ref class FrameworkElementFactory
[System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)]
public class FrameworkElementFactory
type FrameworkElementFactory = class
Public Class FrameworkElementFactory
繼承
FrameworkElementFactoryFrameworkElementFactoryFrameworkElementFactoryFrameworkElementFactory
屬性

備註

這個類別是已被取代的方式,以程式設計方式建立範本,這是類別的子FrameworkTemplate這類ControlTemplateDataTemplate; 並非所有範本的功能時,使用您建立範本,使用這個類別。This class is a deprecated way to programmatically create templates, which are subclasses of FrameworkTemplate such as ControlTemplate or DataTemplate; not all of the template functionality is available when you create a template using this class. 若要以程式設計方式建立範本的建議的方式是載入XAMLXAML從字串或使用記憶體資料流Load方法XamlReader類別。The recommended way to programmatically create a template is to load XAMLXAML from a string or a memory stream using the Load method of the XamlReader class.

建構函式

FrameworkElementFactory() FrameworkElementFactory() FrameworkElementFactory() FrameworkElementFactory()

初始化 FrameworkElementFactory 類別的新執行個體。Initializes a new instance of the FrameworkElementFactory class.

FrameworkElementFactory(String) FrameworkElementFactory(String) FrameworkElementFactory(String) FrameworkElementFactory(String)

使用指定要產生的文字,初始化 FrameworkElementFactory 類別的新執行個體。Initializes a new instance of the FrameworkElementFactory class with the specified text to produce.

FrameworkElementFactory(Type) FrameworkElementFactory(Type) FrameworkElementFactory(Type) FrameworkElementFactory(Type)

使用指定的 FrameworkElementFactory 初始化 Type 類別的新執行個體。Initializes a new instance of the FrameworkElementFactory class with the specified Type.

FrameworkElementFactory(Type, String) FrameworkElementFactory(Type, String) FrameworkElementFactory(Type, String) FrameworkElementFactory(Type, String)

使用指定 FrameworkElementFactory 和名稱,初始化 Type 類別的新執行個體。Initializes a new instance of the FrameworkElementFactory class with the specified Type and name.

屬性

FirstChild FirstChild FirstChild FirstChild

取得第一個子處理站。Gets the first child factory.

IsSealed IsSealed IsSealed IsSealed

取得值,指出這個物件的狀態是否不可變。Gets a value that indicates whether this object is in an immutable state.

Name Name Name Name

取得或設定範本項目的名稱。Gets or sets the name of a template item.

NextSibling NextSibling NextSibling NextSibling

取得下一個同層級 (Sibling) 處理站。Gets the next sibling factory.

Parent Parent Parent Parent

取得父 FrameworkElementFactoryGets the parent FrameworkElementFactory.

Text Text Text Text

取得或設定要產生的文字字串。Gets or sets the text string to produce.

Type Type Type Type

取得或設定這個處理站產生之物件的型別。Gets or sets the type of the objects this factory produces.

方法

AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate) AddHandler(RoutedEvent, Delegate)

將所指定路由事件的事件處理常式加入這個處理站所建立的執行個體。Adds an event handler for the given routed event to the instances created by this factory.

AddHandler(RoutedEvent, Delegate, Boolean) AddHandler(RoutedEvent, Delegate, Boolean) AddHandler(RoutedEvent, Delegate, Boolean) AddHandler(RoutedEvent, Delegate, Boolean)

當路由事件被標記為已由路由中其他項目處理時,使用叫用提供之處理常式的選項,將特定路由事件的事件處理常式加入至這個處理站所建立的執行個體。Adds an event handler for the given routed event to the instances created by this factory, with the option of having the provided handler be invoked even in cases of routed events that had already been marked as handled by another element along the route.

AppendChild(FrameworkElementFactory) AppendChild(FrameworkElementFactory) AppendChild(FrameworkElementFactory) AppendChild(FrameworkElementFactory)

將子處理站加入至這個處理站。Adds a child factory to this factory.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate) RemoveHandler(RoutedEvent, Delegate)

從特定的路由事件中移除事件處理常式。Removes an event handler from the given routed event. 這適用於這個處理站所建立的執行個體。This applies to the instances created by this factory.

SetBinding(DependencyProperty, BindingBase) SetBinding(DependencyProperty, BindingBase) SetBinding(DependencyProperty, BindingBase) SetBinding(DependencyProperty, BindingBase)

設定屬性上的資料繫結。Sets up data binding on a property.

SetResourceReference(DependencyProperty, Object) SetResourceReference(DependencyProperty, Object) SetResourceReference(DependencyProperty, Object) SetResourceReference(DependencyProperty, Object)

設定子屬性上的動態資源參考。Set up a dynamic resource reference on a child property.

SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

設定相依性屬性的值。Sets the value of a dependency property.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於