콘텐츠로 이동

ElementTrigger class

이 콘텐츠는 아직 번역되지 않았습니다.

Applies its setters to a single element while the observed property equals Value, attached through Triggers.

public sealed class ElementTrigger
name description
static When<T>(…) Creates a trigger that applies setters while property equals value.
Property { get; set; } Gets the property whose value is the condition.
Setters { get; set; } Gets the setters applied while the trigger matches; UnsetSetter is not valid here.
Value { get; set; } Gets the value the condition property must equal for the trigger to match.

When the value stops matching, the setters are removed and whatever the style system, inheritance or defaults provide shows again. Independent of Style, so it works on elements that are not controls.