wpf - Combine different Triggers with a logic -


i'm facing problem, don't understand how animate custom styled controls. understand heavy topic , read many approaches visualstatemanager, triggers , behaviors. however, every approach has limitations , come same question: how do right? now, stick trigger approach, because think it's general approach.

however, i'm struggling in creating animation logic. example, i'd animate textbox's border. created 3 events triggers: mouseenter, mouseleave , gotfocus. whenever mouse enters control, textbox's border changes color. when it's focused changes color again. however, when mouse leave's textbox border doesn't keep focus color shows color defined in mouseleave event trigger. how create logic keeps focus color in case?

how solve tasks these? can recommand resources describe actual solutions , not possible ways?

you use multitrigger or multidatatrigger listens several properties:

<style.triggers>     <multitrigger>         <multitrigger.conditions>             <condition property="ismouseover" value="true"/>             <condition property="iskeyboardfocused" value="true"/>         </multitrigger.conditions>         <setter property="borderbrush" value="red"/>     </multitrigger> </style.triggers> 

<multitrigger>     <multitrigger.conditions>         <condition property="ismouseover" value="true"/>         <condition property="iskeyboardfocused" value="true"/>     </multitrigger.conditions>     <multitrigger.enteractions>         <beginstoryboard>             <storyboard>                 ...             </storyboard>         </beginstoryboard>     </multitrigger.enteractions> ... 

wpf multitrigger , multidatatrigger: http://www.wpf-tutorial.com/styles/multi-triggers-multitrigger-multidatatrigger/


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -