run trigger in click event

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


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



thanks from all of friends.




Responses

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

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

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

Login to post response