开发者

Is there any way to inherit from TriggerAction class?

开发者 https://www.devze.com 2022-12-19 07:44 出处:网络
I am not interested in animations and I am trying to make simple setter action to be set w开发者_如何学JAVAithout key frames.

I am not interested in animations and I am trying to make simple setter action to be set w开发者_如何学JAVAithout key frames.

I wanted to inherit TriggerAction; make properties that set the new value on target, any additional optional properties so I can use:

<EventTrigger SourceName="btn" RoutedEvent="Click">
    <BooleanActionTrigger TargetName="cb" Property="IsChecked" Value="False"/>
</EventTrigger>


You do not need to have Expression Blend installed. System.Windows.Interactivity for WPF is now available on NuGet. Simply add that NuGet package to your project and write your custom TriggerAction:

using System.Windows;
using System.Windows.Interactivity;

public class MyCustomAction : TriggerAction<DependencyObject>
{
    ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消