FrameworkElementFactory Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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) |
Initializes a new instance of the FrameworkElementFactory class with the specified Type. |
FrameworkElementFactory(Type, String) |
Initializes a new instance of the FrameworkElementFactory class with the specified Type and name. |
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) |
Adds an event handler for the given routed event to the instances created by this factory. |
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) |
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기