dotnet / dotnet/wpf

Make FrameworkElement.Triggers support more types of triggers

Open
#89 1 comment 5 reactions 0 assignees View on GitHub
API suggestion
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

`FrameworkElement.Triggers` now only accepts `EventTriggers` type, and we have to write a `Style` to add other triggers to the element, as shown below:

```xml



<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Gray" />
</Trigger>
</Style.Triggers>



```

I think we need a more simplified xaml syntax to add triggers (`Trigger`, `DataTrigger`, `MultiTrigger` and `MultiDataTrigger`), just like below:

```xml







```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.