Reputation: 197
How can I add an image to the radiobutton in WPF dynamically? is it possible?
Upvotes: 0
Views: 1944
Reputation: 19895
myRadioButton.Content
= new Image()
{
Source =
(new ImageSourceConverter()).ConvertFrom(
"Images/pic.png") as
ImageSource
};
This code will load an image "pic.png" in a radio button from local "Images" folder from same assembly.
Upvotes: 1