wpf - In Template, can I make a trigger change Path.Fill when Path is a ContentPresenter? -


i have button template, contentpresenter path.

on mouseover, want change path.fill.

see template:

    <style x:key="spinbuttonstyle" targettype="{x:type repeatbutton}">         <setter property="template">             <setter.value>                 <controltemplate targettype="{x:type repeatbutton}">                     <border x:name="bd" borderthickness="0" background="transparent" cornerradius="2">                         <contentpresenter horizontalalignment="stretch" verticalalignment="stretch" />                     </border>                     <controltemplate.triggers>                         <trigger property="ismouseover" value="true">                             <setter property="background" targetname="bd" value="#666666"/>                             <setter property="control.foreground" value="#999999"/>                         </trigger>                     </controltemplate.triggers>                 </controltemplate>             </setter.value>         </setter>     </style> 

and code uses template:

<repeatbutton style="{staticresource spinbuttonstyle}">     <path blah blah blah/> </repeatbutton> 

now, in case, contentpresenter path. there way change path.fill color in xaml?

all need bind path fill property repeatbutton foreground property:

fill="{binding path=foreground, relativesource={relativesource ancestortype={x:type repeatbutton}}}" 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -