In my Windows Phone 8 app I use set of icons. These icons are used multiple times with different size and colour. Right now I just have multiple png files from same icon to cover all these variants.
How this can he handled with vector images? My ultimate goal is to store vector path to e.g. resource file and use that as "image source", set image size and colour in my view, not in resource file.
Lets say I have Canvar like this:
<Canvas Width="76" Height="76" Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
<Path Width="23.75" Height="49.4791" Canvas.Left="26.9167" Canvas.Top="13.8542" Stretch="Fill" Fill="#FF000000" Data="F1 M 26.9167,13.8542L 50.6666,13.8542L 50.6667,39.5833L 26.9167,63.3333L 26.9167,13.8542 Z "/>
</Canvas>
How I can store this to resource and use it as image source?
All suggestions and ideas are welcome how to handle this.
UPDATE
Based on Chris W answer, I came to this solution:
<Style x:Key="Marker" TargetType="ContentControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<Canvas Width="76" Height="76">
<Path Fill="{TemplateBinding Foreground}" Data="m 26.9167 13.8542 23.7499 0 10e-5 25.7291 -23.75 23.75 0 -49.4791 z"></Path>
</Canvas>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ContentControl Style="{StaticResource Marker}" Foreground="Red" />
This works ok, I can reuse the Mrker style and set it fill color. The missing piece in this is, how should I resize the canvas/contetnControl?
Now the canvas size is 76*76, even if I change that the output image still the same size. How should I resize the canvas?