Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FrameworkElement.Triggers support more types of triggers #89

Open
DingpingZhang opened this issue Dec 5, 2018 · 1 comment
Open
Labels
API suggestion Early API idea and discussion, it is NOT ready for implementation
Milestone

Comments

@DingpingZhang
Copy link

DingpingZhang commented Dec 5, 2018

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

        <Button>
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="Gray" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
        </Button>

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

        <Button>
            <Button.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Background" Value="Gray" />
                </Trigger>
            </Button.Triggers>
        </Button>
@rladuca rladuca added Enhancement Requested Product code improvement that does NOT require public API changes/additions API suggestion Early API idea and discussion, it is NOT ready for implementation labels Dec 5, 2018
@rladuca rladuca added this to the Future milestone Dec 5, 2018
@karelz
Copy link
Member

karelz commented Dec 5, 2018

@rladuca I suggest to use just 1 issue type label (although it is not clearly stated in the guide - something to fix). In this sense, each api-suggestion is implicitly an enhancement.

@karelz karelz removed the Enhancement Requested Product code improvement that does NOT require public API changes/additions label Dec 5, 2018
@grubioe grubioe added this to Incoming / New in Future Enhancements / Bugs May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API suggestion Early API idea and discussion, it is NOT ready for implementation
Projects
No open projects
Development

No branches or pull requests

3 participants