FrameworkTemplate 类

定义

可以实例化 FrameworkElement 和/或 FrameworkContentElement 对象的树。Enables the instantiation of a tree of FrameworkElement and/or FrameworkContentElement objects.

public ref class FrameworkTemplate abstract : System::Windows::Threading::DispatcherObject, System::Windows::Markup::INameScope, System::Windows::Markup::IQueryAmbient
[System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)]
[System.Windows.Markup.ContentProperty("VisualTree")]
public abstract class FrameworkTemplate : System.Windows.Threading.DispatcherObject, System.Windows.Markup.INameScope, System.Windows.Markup.IQueryAmbient
type FrameworkTemplate = class
    inherit DispatcherObject
    interface INameScope
    interface IQueryAmbient
Public MustInherit Class FrameworkTemplate
Inherits DispatcherObject
Implements INameScope, IQueryAmbient
继承
FrameworkTemplate
派生
属性
实现

构造函数

FrameworkTemplate()

初始化 FrameworkTemplate 类的新实例。Initializes a new instance of the FrameworkTemplate class.

属性

Dispatcher

获取与此 Dispatcher 关联的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(继承自 DispatcherObject)
HasContent

获取一个值,该值指示此模板是否具有优化内容。Gets a value that indicates whether this template has optimized content.

IsSealed

获取一个值,该值指示此对象是否处于不可变状态,如果处于该状态则无法更改对象。Gets a value that indicates whether this object is in an immutable state so it cannot be changed.

Resources

获取或设置可在此模板范围内使用的资源集合。Gets or sets the collection of resources that can be used within the scope of this template.

Template

获取或设置一个引用,该引用指向当编写器定义或应用模板时用于录制或播放模板的 XAML 节点的对象。Gets or sets a reference to the object that records or plays the XAML nodes for the template when the template is defined or applied by a writer.

VisualTree

获取或设置模板的根节点。Gets or sets the root node of the template.

方法

CheckAccess()

确定调用线程是否可以访问此 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
FindName(String, FrameworkElement)

查找与此模板中定义的指定名称关联的元素。Finds the element associated with the specified name defined within this template.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
LoadContent()

将模板的内容加载为对象的实例,并返回该内容的根元素。Loads the content of the template as an instance of an object and returns the root element of the content.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
RegisterName(String, Object)

将新的名称/对象对注册到当前名称范围内。Registers a new name/object pair into the current name scope.

Seal()

锁定模板,使其无法更改。Locks the template so it cannot be changed.

ShouldSerializeResources(XamlDesignerSerializationManager)

返回一个值,该值指示序列化过程是否应序列化此类的实例上的 Resources 属性值。Returns a value that indicates whether serialization processes should serialize the value of the Resources property on instances of this class.

ShouldSerializeVisualTree()

返回一个值,该值指示序列化过程是否应序列化此类的实例上的 VisualTree 属性值。Returns a value that indicates whether serialization processes should serialize the value of the VisualTree property on instances of this class.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
UnregisterName(String)

从 XAML 名称范围中移除名称/对象映射。Removes a name/object mapping from the XAML namescope.

ValidateTemplatedParent(FrameworkElement)

当在派生类中重写时,为要应用此模板的元素提供规则。When overridden in a derived class, supplies rules for the element this template is applied to.

VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。Enforces that the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)

显式接口实现

INameScope.FindName(String)

返回具有提供的标识名称的对象。Returns an object that has the provided identifying name.

IQueryAmbient.IsAmbientPropertyAvailable(String)

查询当前范围中是否有指定的环境属性。Queries whether a specified ambient property is available in the current scope.

ISealable.CanSeal
ISealable.IsSealed
ISealable.Seal()

适用于