title: How to create user defined converter() equivalent function replacing converter(defined in IValueConverter)
body: <p>I am c# silvelight5 beginner and under a situation that i have to create my own Converter() function which must be similar like <code>Converter()</code> function derived from <code>IValueConverter</code> Interface.</p>
  
  <p>What data i have right now ?
  I have correctly deserialized xml and on deserializing i got this:</p>
  
  <pre><code>XmlSerializer deserializer = new XmlSerializer(typeof(Parameter));//this Parameter is class obtained from(Root node of xml) and "parameter" is object.
  XmlReader reader = XmlReader.Create(new StringReader(xmlstring));
  Parameter parameter = (Parameter)deserializer.Deserialize(reader);
  foreach (var item in parameter.Component.Attributes.Items)
  {
      Debug.WriteLine(item);//It works correctly i have debugged
  }
  </code></pre>
  
  <p>As you can see that i have object <code>parameter</code> which now contains the xml elements and roots (I mean all the data).
  Using this object now i tried to create Converter equivalent like this(his code is also in the same class):</p>
  
  <pre><code>ICollection&lt;Parameter&gt; list = parameter as ICollection&lt;Parameter&gt;;// **Problem creating line**
  List&lt;UIElement&gt; result = new List&lt;UIElement&gt;();   
  </code></pre>
  
  <p>You can see this <code>"parameter"</code> is obtained from deserialization and i was sure on debugging that it is deserialized properly.
  So here i have replaced <code>"value"</code> of converter() to <code>"parameter"</code>. </p>
  
  <p>The problem is when i debug and see then the parameter contains all deserialized xml but i don't know <strong>why "list" shows null always ?</strong> even i can see all the xml elements(i mean node values) on debugging but why "parameter" is not assigned to "list" ? (I guess it shows null because this parameter is of Parameter type. But how to make it use in current context ?)</p>
  
  <p>Could some one please correct me and write me the way to equivalent of Converter() where we have already the object obtained from deserializing xml ? would be a big help.</p>