I have been searching on the web of a way to set a svg as a source of an image as the simplest way possible, so far i have tried a lot of different methods and anyone has worked for me.
I had my svg file converted to a xaml file, then tried to save it as a ResourceDictionary but didnt work... I also tried to use this answer but i couldnt find out the supported ContentControl for my svg file...
If you can tell me the detailed step by step to how to set a svg in to my wpf c# project i would be very thankful. Here is my png picture and all the other tries i made.
I used this link to convert png to svg. Then i turned the resulted svg to xaml using Inkscape
Here is my code:
<Grid Background="#FFFFC000">
<Viewbox Stretch="Uniform">
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Name="svg3336" Width="150" Height="96">
<Canvas.RenderTransform>
<TranslateTransform X="0" Y="0"/>
</Canvas.RenderTransform>
<Canvas.Resources/>
<Canvas Name="g3340">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="0.100000" ScaleY="-0.100000"/>
<TranslateTransform X="0.000000" Y="96.000000"/>
</TransformGroup>
</Canvas.RenderTransform>
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="path3342" Fill="White" Data="M10 479 l0 -472 168 6 c313 12 573 94 797 252 104 73 272 246 339 349 61 92 126 216 126 239 0 7 4 17 9 23 4 5 13 24 19 42 l11 32 -735 0 -734 0 0 -471z m242 445 l178 -6 -52 -47 c-60 -54 -68 -58 -68 -36 0 29 -27 45 -74 45 -60 0 -72 -18 -68 -99 5 -80 22 -69 22 15 l0 64 50 0 c48 0 50 -1 50 -28 0 -23 -20 -46 -110 -127 -60 -54 -112 -105 -115 -113 -6 -18 20 -61 42 -69 9 -3 24 -1 34 6 18 11 19 5 19 -141 0 -192 -3 -188 125 -188 103 0 105 1 105 68 0 75 7 83 64 80 l51 -3 3 -60 c2 -32 8 -65 14 -72 15 -18 191 -18 206 0 7 8 12 74 13 169 l1 157 24 -11 c21 -10 28 -8 50 12 14 14 24 33 22 45 -2 12 -77 83 -184 175 l-180 155 479 3 c264 1 482 1 484 -1 8 -9 -60 -157 -108 -237 -244 -402 -679 -640 -1179 -644 l-115 -1 -3 435 c-1 239 0 440 2 446 5 14 12 14 218 8z m244 -59 c24 -20 49 -41 56 -48 7 -7 70 -61 141 -120 70 -60 127 -111 127 -115 -1 -10 -26 -42 -34 -42 -4 0 -73 57 -154 128 -81 70 -155 133 -164 141 -16 12 -33 1 -155 -105 -76 -65 -150 -129 -165 -143 -27 -24 -28 -24 -48 -6 -11 10 -19 22 -18 26 2 4 43 42 93 85 127 108 204 175 240 206 16 15 32 28 34 28 2 0 23 -16 47 -35z m88 -198 l129 -112 1 -167 1 -168 -93 0 -93 0 2 73 2 72 -81 3 -82 3 0 -76 0 -75 -90 0 -90 0 0 168 0 167 108 92 c59 50 116 100 127 112 11 11 22 20 25 20 3 0 63 -50 134 -112z"/>
</Canvas>
</Canvas>
</Viewbox>
</Grid>
As you can see, i added the whole xaml file to my code instead of just call it...