WinRT HubSection Change Font on Hover -


i'm playing around hub app template winrt on visual studio right , needed styles. when open hubpage.xaml, see standard310x260itemtemplate grid has image , text underneath it. cycles through items on sampledata.json file. can change text , font, etc. seems work fine. can't figure out how make change when mouse hovers on it.

    <datatemplate x:key="standard310x260itemtemplate">         <grid height="250" width="310" margin="5,10,5,10">             <grid.rowdefinitions>                 <rowdefinition height="auto"/>                 <rowdefinition height="*"/>             </grid.rowdefinitions>             <border background="{themeresource listviewitemplaceholderbackgroundthemebrush}" height="150">                 <image source="{binding imagepath}" stretch="uniformtofill" automationproperties.name="{binding title}"/>             </border>             <stackpanel grid.row="1" margin="0,10,0,0">                 <textblock text="{binding title}" style="{staticresource titletextblockstyle}" textwrapping="nowrap" foreground="red"/>                 <textblock text="{binding lesson1_text1}" style="{staticresource bodytextblockstyle}" maxheight="60" />             </stackpanel>         </grid>     </datatemplate> 

by default, changes color of text, don't see code happen. put snippet of code, it's 1 comes template. hoping change second textblock words italicized on hover, instead of having font color change. incredibly simple, can't find code it.

thanks reading through this!

i assume 1 of simple ways make trigger. have add code below style bodytextblockstyle

here code:

<style.triggers>     <trigger property="ismouseover" value="true">                                 <setter property="fontstyle" value="italic" />     </trigger> </style.triggers> 

also recommend go msdn , know information visualstatemanager


Comments