run trigger in click event

Posted by Hami under WPF on 7/21/2015 | Points: 10 | Views : 1699 | Status : [Member] | Replies : 2
hi guys. t made a trigger on mouseover value
<style targettype="rectangle">
<datatriger binding {elementname .....}>

cani bind above trigger to a button click event ?
<button name="btn1" content="runtrigger" click="?"

thanks from all of friends.


Posted by: Bandi on: 7/21/2015 [Member] [MVP] Platinum | Points: 25
Posted by: Pannasn on: 1/23/2019 [Member] Starter | Points: 25

Yes....Using Event Trigger.
<Button Content="Button!" Click="OnButtonClick">
<EventTrigger RoutedEvent="Click">
<Setter TargetName="theTab" Property="IsSelected" Value="True" />

Hami, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response