Glowing WPF Buttons -


after clicking wpf buttons in our app glow blue, original color, blue, etc. appears default behavior on windows vista/7. not happen on xp. advice?

you need override default button template -- http://mark-dot-net.blogspot.com/2007/07/creating-custom-wpf-button-template-in.html should ya started.

specifically section 3:

<controltemplate.triggers>     <trigger property="ismouseover" value="true">         <setter targetname="border" property="borderbrush" value="#ff4788c8" />         <setter property="foreground" value="#ff4788c8" />     </trigger>     <trigger property="ispressed" value="true">                           <setter property="background" >            <setter.value>                <lineargradientbrush startpoint="0,0" endpoint="0,1" >                    <gradientstop color="#ffffd190" offset="0.35"/>                    <gradientstop color="orange" offset="0.95"/>                    <gradientstop color="#ffffd190" offset="1"/>                </lineargradientbrush>             </setter.value>         </setter>         <setter targetname="content" property="rendertransform" >             <setter.value>                 <translatetransform y="1.0" />             </setter.value>         </setter>     </trigger>     <trigger property="isdefaulted" value="true">        <setter targetname="border" property="borderbrush" value="#ff282828" />     </trigger>     <trigger property="isfocused" value="true">        <setter targetname="border" property="borderbrush" value="#ff282828" />     </trigger>     <trigger property="isenabled" value="false">        <setter targetname="border" property="opacity" value="0.7" />        <setter property="foreground" value="gray" />    </trigger> </controltemplate.triggers> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -