TemplateVisualStateAttribute 类

定义

指定控件可以处于特定状态,并且 VisualState 应位于控件的 ControlTemplate 中。

public ref class TemplateVisualStateAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AllowMultiple]
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.RuntimeClass)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class TemplateVisualStateAttribute final : Attribute
/// [Windows.Foundation.Metadata.AllowMultiple]
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.RuntimeClass)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.AttributeName("templatevisualstate")]
class TemplateVisualStateAttribute final : Attribute
[Windows.Foundation.Metadata.AllowMultiple]
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.RuntimeClass)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class TemplateVisualStateAttribute : Attribute
[Windows.Foundation.Metadata.AllowMultiple]
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.RuntimeClass)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.AttributeName("templatevisualstate")]
public sealed class TemplateVisualStateAttribute : Attribute
Public NotInheritable Class TemplateVisualStateAttribute
Inherits Attribute
继承
TemplateVisualStateAttribute
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

构造函数

TemplateVisualStateAttribute()

初始化 TemplateVisualStateAttribute 类的新实例。

字段

GroupName

指定控件可以处于特定状态,并且 VisualState 应位于控件的 ControlTemplate 中。

Name

指定控件可以处于特定状态,并且 VisualState 应位于控件的 ControlTemplate 中。

适用于

另请参阅