Change the disabled color of a button in XAML Windows 8 -


i want able change background color of button in xaml when it's disabled don't know override.

anybody know need do?

i'm create windows 8 store app using xaml , c# 4.5.

my current button style follows:

        <style x:key="mysavebuttonstyle"                targettype="buttonbase">             <setter property="fontfamily"                     value="segoe ui symbol" />             <setter property="fontsize"                     value="36" />             <setter property="content"                     value="&#xe105;" />             <setter property="height"                     value="70" />             <setter property="width"                     value="80" />             <setter property="borderbrush"                     value="white" />             <setter property="foreground"                     value="{staticresource buttonforegroudbrush}" />             <setter property="borderthickness"                     value="1" />             <setter property="background"                     value="white" />         </style> 

thanks advance.

you have override default controltemplate of button.

to this: right click button in designer view - edit template - edit copy

then visual studio creates default template you.

in template code there visualstatemanager section groups , states.

and 1 of them is

 <visualstate x:name="disabled"> //change demands  </visualstate> 

here can change want when control disabled.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -