Skip to content

Instantly share code, notes, and snippets.

@timheuer
Created September 3, 2012 22:16
Show Gist options
  • Save timheuer/3614084 to your computer and use it in GitHub Desktop.
Save timheuer/3614084 to your computer and use it in GitHub Desktop.
PathBasedAppBarButtonStyle
<Style x:Key="PathBasedAppBarButtonStyle" BasedOn="{StaticResource AppBarButtonStyle}" TargetType="ButtonBase">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Path Width="20" Height="20"
Stretch="Uniform"
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}}"
Data="{Binding Path=Content, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment