title: Adding custom attributes to an element in XAML?
body: <p>In html, there is nothing preventing you from creating custom attributes, since it is effectively xml such as</p>
  
  <pre><code>&lt;span myProperty="myValue"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Then you can read that property via javascript.</p>
  
  <p>Can you do the same thing in wpf? For example:</p>
  
  <pre><code>&lt;Canvas MyProperty="MyValue" Name="MyCanvas" DataContext="{Binding}" Background="Black" Margin="181,0,0,0"&gt;&lt;/Canvas&gt;
  </code></pre>
  
  <p>and If so how would you access that property? For example:</p>
  
  <pre><code>MyCanvas.MyProperty;
  </code></pre>