title: Best way to store data for various ui elemnts on screen
body: <p>I am developing a diagramming tool where I drag and drop controls to the diagramming surface,just like VS or visio or paint. </p>
  
  <p>Each control/element ,dropped on the surface, will present a context menu "properties" when right clicked. The "properties" dialog will display a set of data relevant to each element/control.</p>
  
  <p>My question is how best to store/load this non UI data,attached  to each element/control on the surface.</p>
  
  <p>for example I create  elements LED1,breaker 1,connector 1  in design mode.i will to have store<br>
  different set of  data  for each of them. </p>
  
  <p>storage logic will be like this</p>
  
  <pre><code>   for all elements on diagram
      1. input element id,element type.
      2. store data for that element ID.  
  </code></pre>
  
  <p>When the diagram i created, is run as a application, the appropriate data has to be retrieved for each for these elements from storage by the loader.</p>
  
  <p>loader logic may go like this </p>
  
  <p>for all elements on diagram</p>
  
  <ol>
  <li>detect element id and element type</li>
  <li>get data for the above id. </li>
  </ol>
  
  <p>I thought xml of a resource. but my manager didn't seem enthusiastic. </p>
  
  <p>I was wondering how the most experienced/proficient wpf  developers will go about this.</p>