问题
How can I add an image to the radiobutton in WPF dynamically? is it possible?
回答1:
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.
来源:https://stackoverflow.com/questions/7767667/how-can-i-add-background-image-to-radiobutton-in-wpf