Why is my Silverlight 3 setter causing AG_E_INVALID_ARGUMENT exceptions? Here are two code samples. The first throws an exception but th second does not. What am I doing wrong in the first one?
This one throws the exception:
<Grid.Resources>
<Style TargetType="Button" x:Key="refreshBtn">
<Setter Property="Content">
<Setter.Value>
<Image Source="../Images/list-add.png" />
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<Button Style="{StaticResource refreshBtn}" />
However, this one does not:
<Button>
<Button.Content>
<Image Source="../Images/list-add.png" />
</Button.Content>
</Button>
How do I make the first example work?