FrameworkElementFactory FrameworkElementFactory FrameworkElementFactory FrameworkElementFactory Class

Definition

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
Inheritance
FrameworkElementFactoryFrameworkElementFactoryFrameworkElementFactoryFrameworkElementFactory
Attributes

Remarks

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. The recommended way to programmatically create a template is to load XAML from a string or a memory stream using the Load method of the XamlReader class.

Constructors

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

Initializes a new instance of the FrameworkElementFactory class.

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

Initializes a new instance of the FrameworkElementFactory class with the specified text to produce.

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)

Initializes a new instance of the FrameworkElementFactory class with the specified Type and name.

Properties

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

Gets the next sibling factory.

Parent Parent Parent Parent

Gets 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.

Methods

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()

Gets the Type of the current instance.

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

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)

Applies to