I want to make buttons with icons.
In the view model:
public string Icon { get { return icon; } set { icon = value; OnPropertyChanged(); } } Well, and some value:
this.Icon = "pack://application:,,,/Icons/folder_96px.png"; In the markup:
<Style TargetType="Button" x:Key="IconButton" BasedOn="{StaticResource BaseButton}"> <Setter Property="Content"> <Setter.Value> <Image Source="{Binding Icon}"/> </Setter.Value> </Setter> </Style> But in the end it looks weird:
Googled, the case seems to be solved by some kind of flag x: Shared = "False", but with this markup I do not understand where to stick.
