title: How to use nested class in WPF XAML?
body: <p>I am refactoring the code from sample:   </p>
  
  <ul>
  <li><a href="http://www.java2s.com/Tutorial/CSharp/0470__Windows-Presentation-Foundation/MasterDetailBinding.htm" rel="noreferrer">24.129.21. Master Detail Binding</a><br>
  from <a href="http://www.java2s.com/Tutorial/CSharp/CatalogCSharp.htm" rel="noreferrer">C# / CSharp Tutorial</a> » Windows Presentation Foundation » Binding)  </li>
  </ul>
  
  <p>And <a href="https://stackoverflow.com/a/14536818/200449">after excluding Skills class</a>, with corresponding changes in<br>
  in <strong>MainWindow.xaml</strong></p>
  
  <pre><code>&lt;local:Team&gt;
    &lt;local:Employee Name="Larry" Age="21"&gt;
      &lt;local:Employee.Skills&gt;
        &lt;!--  local:Skills --&gt;
         &lt;local:Skills&gt;
  </code></pre>
  
  <p>in <strong>MainWindow1.xaml.cs</strong>:     </p>
  
  <pre><code>using System.Collections.Generic;
  using System.Collections.ObjectModel;
  using System.Windows;
  namespace WpfApplication
  {
    public class Skill
    {//I'd like to exclude class Skill having moved it into class Employee as nested one
      public string Description { get; set; }
    }
  
     public class Employee 
     {
      public string Name { get  ; set; }
      public int Age  { get; set; }
      public List&lt;Skill&gt; Skills { get; set; }
  
       public Employee()
       {
         Skills=new List&lt;Skill&gt;();
       }
  
       /*class Skill  
       {
            public string Description { get; set; }
       }   */
    }
  
    public class Team : ObservableCollection&lt;Employee&gt; { }
  
    public class Company
    {
      public string CompanyName { get  ; set; }
      public Team Members { get  ; set; }
    }
  
    public class Companies : ObservableCollection&lt;Company&gt; { }
  
    public partial class Window1 : Window
      {
        public Window1()
      {
          InitializeComponent();
      }
    }
  }
  </code></pre>
  
  <p>How should I change Window1.XAML if to move:</p>
  
  <ul>
  <li><code>Skill</code> class into <code>Employee</code> class    </li>
  </ul>
  
  <p>in Window1.xaml.cs?  </p>
  
  <h2>Related questions</h2>
  
  <p>based on the same code:  </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/14548012/how-to-change-a-custom-type-to-system-type-string-in-wpf-xaml">How to change a custom type to System type (string) in WPF XAML?</a>  </li>
  </ul>
  
  <p><strong>Update (answering  1st RV1987's comment)</strong>:  </p>
  
  <p>Answers tp <a href="https://stackoverflow.com/questions/4269896/creating-an-instance-of-a-nested-class-in-xaml">Creating an instance of a nested class in XAML</a> tell that it is possible but unclear how to use:  </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/a/13371083">answer by Ludovic</a> tells that it is possible but contains comment that it is not clear how to use.<br>
  This is quite in line with my experience and this question  </li>
  <li><p>another <a href="https://stackoverflow.com/a/4270348">answer by townsean</a> is based on citation <a href="http://msdn.microsoft.com/en-us/library/ms753379.aspx" rel="noreferrer">from msdn</a>:<br>
  "Your custom class must not be a nested class. Nested classes and the <strong>"dot"</strong> in their <strong>general</strong> CLR usage syntax interfere with other WPF and/or XAML features such as attached properties."   </p>
  
  <p>But, it is in <strong>general</strong>, and for "your custom class" but in in my <strong>concrete</strong> code attached to this question there are dozens <strong>"dots"</strong> (like <code>Employee.Skills</code>) and it is not my custom class that is nested but my custom class has nested class inside.  </p></li>
  </ul>
  
  <p><strong>Update2 (answering 2nd RV1987's comment-question)</strong>:<br>
  Yes, I've just tried that <a href="https://stackoverflow.com/a/13371083">+ approach</a>, which does not work, but:  </p>
  
  <ul>
  <li>XAML gives me errors even on perfectly working elements  </li>
  <li>I've not tried to use reflector myself or find any other workable approach or less ambiguous reference from Microsoft on it    </li>
  </ul>