我为Button创建了一个Blend行为.如何将其设置为应用程序中的所有按钮.
<Button ...>
<i:Interaction.Behaviors>
<local:MyBehavior />
</i:Interaction.Behaviors>
</Button>
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试:
<Style>
<Setter Property="i:Interaction.Behaviors">
<Setter.Value>
<local:MyBehavior />
</Setter.Value>
</Setter>
</Style>
Run Code Online (Sandbox Code Playgroud)
我收到了错误
"行为"属性没有可访问的setter.