Class MarkupSetterCollectionAttribute
- Namespace
- Icy.Markup
- Assembly
- IcyUI.dll
Designates the property that holds a type's markup attributes that don't resolve to a real CLR member - each becomes an entry in the named Dictionary<TKey, TValue> instead of raising an "unknown property" error.
[AttributeUsage(AttributeTargets.Class, Inherited = true)]
public sealed class MarkupSetterCollectionAttribute : Attribute
- Inheritance
-
MarkupSetterCollectionAttribute
- Inherited Members
- Extension Methods
Remarks
Used by Style and VisualState: an attribute like
Background="Blue" on <Style TargetType="Button"> isn't a property of Style
itself - it's a setter to apply to a Button once the style is applied. The value is converted
against the nearest enclosing <Style>'s TargetType (see
the loader's current setter target type) rather than against the marked type's own properties.
Mirrors ContentPropertyAttribute's shape and inheritance rule.
Constructors
MarkupSetterCollectionAttribute(string)
Designates the property that holds a type's markup attributes that don't resolve to a real CLR member - each becomes an entry in the named Dictionary<TKey, TValue> instead of raising an "unknown property" error.
public MarkupSetterCollectionAttribute(string name)
Parameters
namestringThe name of the dictionary property attribute overflow is written into.
Remarks
Used by Style and VisualState: an attribute like
Background="Blue" on <Style TargetType="Button"> isn't a property of Style
itself - it's a setter to apply to a Button once the style is applied. The value is converted
against the nearest enclosing <Style>'s TargetType (see
the loader's current setter target type) rather than against the marked type's own properties.
Mirrors ContentPropertyAttribute's shape and inheritance rule.
Properties
Name
Gets the name of the dictionary property attribute overflow is written into.
public string Name { get; }
Property Value
Methods
GetSetterCollectionName(Type)
Gets the setter-collection property name declared by type or inherited from one of
its base types.
public static string? GetSetterCollectionName(Type type)
Parameters
typeTypeThe type to look the setter-collection property up for.