Image in a button
Why is it so difficult to put an image into a control button in WPF using C#? in the forms application I just select an image using the image property from a resource file, and Bob's your uncle. why is it so B***** difficult in WPF??? I've googled it, and i get lots of code telling me to write fourteen hundred lines of code (maybe not that many,,) but I'm a busy developer, an I don't have the time to do that. please somebody, tell me there's an easier way..
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Gaurish Kumar108 reputationPosted Jan 22, 2010, 1:58 AM EST
This example creates Button controls with image on it.
Martin Cook46 reputationPosted Feb 10, 2010, 1:25 AM EST
If you are needing to update an image source dynamically based on conditions then you can achieve this using DataTemplates and DataTriggers therefore not requiring any code-behind.
Hope this points you in the right direction.
Cheers,
Martin