title: Using an SVG as a Ribbon SmallImageSource, with SharpVectors?
body: <p>I've successfully been able to use a static .svg file as an image in WPF by following the guidance <a href="https://stackoverflow.com/a/22107360/3195477">in another question</a>.</p>
  
  <p>The basic approach there is to use the <a href="https://www.nuget.org/packages/SharpVectors.Reloaded/" rel="nofollow noreferrer">SharpVectors library</a>, and do:</p>
  
  <pre><code>&lt;svgc:SvgViewbox Source="path/to/file.svg"/&gt;
  </code></pre>
  
  <p>In place of an <code>&lt;Image .../&gt;</code> tag.</p>
  
  <p>However I am struggling trying to find a similar method to use an SVG within a <em><code>System.Windows.Controls.Ribbon</code></em> - where i'd like to use it as the <code>SmallImageSource</code> of a <code>RibbonMenuButton</code>.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>&lt;RibbonMenuButton Label="Test"&gt;
      &lt;RibbonMenuButton.SmallImageSource&gt;
          &lt;svgc:SvgViewbox Source="path/to/file.svg"/&gt;
      &lt;/RibbonMenuButton.SmallImageSource&gt;
  &lt;/RibbonMenuButton&gt;
  </code></pre>
  
  <p>Which produces the compiler error message:</p>
  
  <blockquote>
    <p>The specified value cannot be assigned. The following type was
    expected: "<code>ImageSource</code>".</p>
  </blockquote>
  
  <p>I think the key problem is that an <code>svgc:SvgViewBox</code> is not an "image source", but I don't know how to properly convert or otherwise work around this. </p>
  
  <hr>
  
  <p>I'm open to alternate approaches which don't use SharpVectors, but it is extremely convenient to have source image files in SVG format and not have to manually convert to any other format.</p>