Skip to content

Instantly share code, notes, and snippets.

@iraSenthil
Created June 22, 2011 01:44
Show Gist options
  • Save iraSenthil/1039359 to your computer and use it in GitHub Desktop.
Save iraSenthil/1039359 to your computer and use it in GitHub Desktop.
IValueConverter equalant XAML using Style
<Image Height="69" Width="98" >
<Image.Style>
<Style TargetType="{x:Type Image}">
<Setter Property="Source" Value="Images/tomato.ico" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsApple}" Value="true">
<Setter Property="Source" Value="Images/apple.png" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment