AllowedMemberLocations 枚举

定义

指定在 XAML 中设置属性时针对该属性实施的语法限制,由 XamlDirective 报告。Specifies the syntax restrictions enforced on a property when it is set in XAML, as reported by a XamlDirective.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class AllowedMemberLocations
[System.Flags]
public enum AllowedMemberLocations
type AllowedMemberLocations = 
Public Enum AllowedMemberLocations
继承
AllowedMemberLocations
属性

字段

Any 3

可在 AttributeMemberElement 位置中设置属性。Property can be set in either Attribute or MemberElement location. (此枚举成员定义为这些值的组合。)(This enumeration member is defined as the combination of those values.)

Attribute 1

可在 XAML 特性语法中设置属性。Property can be set in XAML attribute syntax.

MemberElement 2

可在 XAML 属性元素语法中设置属性。Property can be set in XAML property element syntax.

None 0

无法完全在 XAML 中设置属性。Property cannot be set in XAML at all. 这是默认设置。This is the default.

注解

此属性报告的信息不考虑任何可能的标记扩展。Information reported by this property does not account for any possible markup extensions. 首先处理标记扩展, 并可能会在属性使用中返回对象, 即使对于仅表示为 MemberElement 的属性也是如此。Markup extensions are processed first and can potentially return objects from within an attribute usage, even for properties that are notated as MemberElement only.

适用于

另请参阅