c# - How do I get WPF control to mimic the disabled state? -



c# - How do I get WPF control to mimic the disabled state? -

basically have custom wpf button disabled still able react button beingness pressed.

i'd prefer not tie other event types if possible, because there's funny timing issues touch , hold going on already.

thanks!

this wound doing workaround:

this.mylabel.foreground = brushes.darkgray; this.myseparator.borderbrush = brushes.darkgray; this.myotherlabel.foreground = brushes.darkgray;

i'm not huge fan because it's hugely custom components of custom control, @ to the lowest degree quick programmatic way until has better.

you can current template of command this:

system.windows.markup.xamlwriter.save(mybutton.template, new filestream("c:\\bla.xml", filemode.append));

examine template triggers see changes if button disabled, , set properties accordingly.

edit: ok, not it... :-)

you set button disabled, , utilize snoop or show me templates inspect values of layout properties -- or, programmatically, save them style -- enable button 1 time again , apply style it?

c# wpf disabled-control

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -