title: How to declare a decimal value in XAML?
body: <p>I'm able to declare an integer or double value in xaml. However, I can't add a decimal value. It builds ok, but then I get:</p>
  
  <blockquote>
    <p>System.Windows.Markup.XamlParseException: The type 'Decimal' was not
    found.</p>
  </blockquote>
  
  <p>Here's the xaml code:</p>
  
  <pre><code>&lt;UserControl.Resources&gt;
      &lt;system:Int32 x:Key="AnIntValue"&gt;1000&lt;/system:Int32&gt;&lt;!--Works!--&gt;
      &lt;system:Double x:Key="ADoubleValue"&gt;1000.0&lt;/system:Double&gt;&lt;!--Works!--&gt;
      &lt;system:Decimal x:Key="ADecimalValue"&gt;1000.0&lt;/system:Decimal&gt;&lt;!--Fails at runtime--&gt;
  &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>Here's how I'm declaring the system namespace:</p>
  
  <pre><code>xmlns:system="clr-namespace:System;assembly=mscorlib"
  </code></pre>
  
  <p><strong>Edit: Workaround:</strong>
  As Steven mentioned, adding the resource through code-behind seems to work fine:</p>
  
  <pre><code>Resources.Add("ADecimalValue", new Decimal(1000.0));
  </code></pre>
  
  <p><strong>Edit: Answer:</strong>
  Doing exactly the same thing in WPF seems to work fine. So I guess this is a hidden silverlight restriction. Thanks to Steven for this finding.</p>