Standard Button Layout
-
Again on with my quest to learn WPF controls and improve our standard controls library to make it easier to use within a MVVM environment. In this case I am looking for sggestions for how to best implemnt a standard button. I would like to create a standard button which has an image and caption. I understand that this is easily achieved using xaml, but ideally we would like a standard implementation so the button could be used in the following manor.
<CustomControls:StandardButton ButtinImage="Logout.jpg" ButtonCaption="Button Text"/>
How would you achieve this? 1. Inherit from the button class and add dependancy properties 2. Use Attached Properties and a style 3. Inherit fron UserControl using dependancy properties fro the image and caption Thanks for your time
Just racking up the postings
-
Again on with my quest to learn WPF controls and improve our standard controls library to make it easier to use within a MVVM environment. In this case I am looking for sggestions for how to best implemnt a standard button. I would like to create a standard button which has an image and caption. I understand that this is easily achieved using xaml, but ideally we would like a standard implementation so the button could be used in the following manor.
<CustomControls:StandardButton ButtinImage="Logout.jpg" ButtonCaption="Button Text"/>
How would you achieve this? 1. Inherit from the button class and add dependancy properties 2. Use Attached Properties and a style 3. Inherit fron UserControl using dependancy properties fro the image and caption Thanks for your time
Just racking up the postings
I would, personally, go for 1 or 2. 2 is good if you are clear on how to create attached properties.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
Again on with my quest to learn WPF controls and improve our standard controls library to make it easier to use within a MVVM environment. In this case I am looking for sggestions for how to best implemnt a standard button. I would like to create a standard button which has an image and caption. I understand that this is easily achieved using xaml, but ideally we would like a standard implementation so the button could be used in the following manor.
<CustomControls:StandardButton ButtinImage="Logout.jpg" ButtonCaption="Button Text"/>
How would you achieve this? 1. Inherit from the button class and add dependancy properties 2. Use Attached Properties and a style 3. Inherit fron UserControl using dependancy properties fro the image and caption Thanks for your time
Just racking up the postings
If you want to have a bit of fun, you could always create a Blend Behavior which set the Content of the button.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
If you want to have a bit of fun, you could always create a Blend Behavior which set the Content of the button.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
I would, personally, go for 1 or 2. 2 is good if you are clear on how to create attached properties.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.
-
It does to me (and it's very easy to do).
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads