I am currently developing an application in C# using WPF. What I need to be able to do is on a label make their be an image to the left of the text of the label a small image of an X or a small image of a tick depending on the circumstances. I have got the images included in the project in a folder named images.
How can I assign the images to be placed on the left of the label programatically in the code and not using the XAML code.
Since you want this in code behind and not within XAML I would suggest ditching the
Labeland using aStackPanelcoupled with anImageandTextBlockas seen below whereMyGridcould be any container……then in your code behind…