Click here to Skip to main content
15,888,401 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Customizing appearance of user-control property in 'Properties' panel Pin
Prasoon Chaudhary7-Apr-10 1:17
Prasoon Chaudhary7-Apr-10 1:17 
AnswerRe: Customizing appearance of user-control property in 'Properties' panel [modified] Pin
Sevententh7-Apr-10 1:38
Sevententh7-Apr-10 1:38 
GeneralRe: Customizing appearance of user-control property in 'Properties' panel [Solved] Pin
Prasoon Chaudhary7-Apr-10 19:40
Prasoon Chaudhary7-Apr-10 19:40 
QuestionScrollbar on silverlight UserControl [SOLVED] Pin
#realJSOP6-Apr-10 8:10
mve#realJSOP6-Apr-10 8:10 
QuestionWPF Combobox Pin
koleraba6-Apr-10 8:04
koleraba6-Apr-10 8:04 
AnswerRe: WPF Combobox Pin
vsaratkar6-Apr-10 10:23
vsaratkar6-Apr-10 10:23 
GeneralRe: WPF Combobox Pin
koleraba6-Apr-10 12:01
koleraba6-Apr-10 12:01 
QuestionChanging Button Programatically [SLVED, but still accepting input/comments] Pin
#realJSOP6-Apr-10 7:49
mve#realJSOP6-Apr-10 7:49 
I have a button style resource defined (essentially, it defines the button's shape to be an ellipse instead of a rectangle). I am programatically adding a button with this style to my user control. There is no text/content on the button. This part works just fine.

When I add this button, I want to change the background color (green, yellow, red, or gray) based on a given status. How would I go about doing that?

EDIT =========

I kinda cheated. Instead of having just one style and changing the color inside it, I created foru button styles that represent the four status indicators, and pick the appropriate style in the code.

I know, it's probably not very "silverlighty", but it got me past the issue. Smile | :)

Still, if anyone wants to comment, be my guest.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

AnswerRe: Changing Button Programatically [SLVED, but still accepting input/comments] Pin
Pete O'Hanlon6-Apr-10 9:17
mvePete O'Hanlon6-Apr-10 9:17 
AnswerRe: Changing Button Programatically [SLVED, but still accepting input/comments] Pin
Michael J. Eber19-Apr-10 11:49
Michael J. Eber19-Apr-10 11:49 
QuestionChart ToolKit error in WPF Pin
Nanda_MR6-Apr-10 1:36
Nanda_MR6-Apr-10 1:36 
Questionwpf menu errors in XP Pin
hb521342145-Apr-10 13:24
hb521342145-Apr-10 13:24 
AnswerRe: wpf menu errors in XP Pin
hb521342145-Apr-10 13:54
hb521342145-Apr-10 13:54 
QuestionContext Menu Pin
ScottRadel5-Apr-10 12:09
ScottRadel5-Apr-10 12:09 
AnswerRe: Context Menu Pin
hb521342145-Apr-10 13:56
hb521342145-Apr-10 13:56 
GeneralRe: Context Menu Pin
ScottRadel6-Apr-10 8:21
ScottRadel6-Apr-10 8:21 
QuestionSetting a Style Programatically [modified] Pin
#realJSOP5-Apr-10 9:36
mve#realJSOP5-Apr-10 9:36 
AnswerRe: Setting a Style Programatically Pin
Pete O'Hanlon5-Apr-10 10:46
mvePete O'Hanlon5-Apr-10 10:46 
GeneralRe: Setting a Style Programatically Pin
#realJSOP5-Apr-10 12:14
mve#realJSOP5-Apr-10 12:14 
GeneralRe: Setting a Style Programatically Pin
Pete O'Hanlon6-Apr-10 9:03
mvePete O'Hanlon6-Apr-10 9:03 
GeneralRe: Setting a Style Programatically Pin
#realJSOP6-Apr-10 9:17
mve#realJSOP6-Apr-10 9:17 
QuestionText Rotation - Is It Just Me? Pin
#realJSOP5-Apr-10 0:04
mve#realJSOP5-Apr-10 0:04 
AnswerRe: Text Rotation - Is It Just Me? Pin
Pete O'Hanlon5-Apr-10 10:20
mvePete O'Hanlon5-Apr-10 10:20 
QuestionSilverlight Automatic Image Transition Pin
saurabh94-Apr-10 23:03
saurabh94-Apr-10 23:03 
AnswerRe: Silverlight Automatic Image Transition Pin
Michael J. Eber19-Apr-10 11:54
Michael J. Eber19-Apr-10 11:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.