편집

다음을 통해 공유


FrameworkElementFactory Class

Definition

Supports the creation of templates.

public ref class FrameworkElementFactory
[System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)]
public class FrameworkElementFactory
[<System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)>]
type FrameworkElementFactory = class
Public Class FrameworkElementFactory
Inheritance
FrameworkElementFactory
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()

Initializes a new instance of the FrameworkElementFactory class.

FrameworkElementFactory(String)

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

FrameworkElementFactory(Type, String)

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

FrameworkElementFactory(Type)

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

Properties

FirstChild

Gets the first child factory.

IsSealed

Gets a value that indicates whether this object is in an immutable state.

Name

Gets or sets the name of a template item.

NextSibling

Gets the next sibling factory.

Parent

Gets the parent FrameworkElementFactory.

Text

Gets or sets the text string to produce.

Type

Gets or sets the type of the objects this factory produces.

Methods

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.

AddHandler(RoutedEvent, Delegate)

Adds an event handler for the given routed event to the instances created by this factory.

AppendChild(FrameworkElementFactory)

Adds a child factory to this factory.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveHandler(RoutedEvent, Delegate)

Removes an event handler from the given routed event. This applies to the instances created by this factory.

SetBinding(DependencyProperty, BindingBase)

Sets up data binding on a property.

SetResourceReference(DependencyProperty, Object)

Set up a dynamic resource reference on a child property.

SetValue(DependencyProperty, Object)

Sets the value of a dependency property.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to