title: How to add a custom ListBox in C# xaml?
body: <p>I had a custom class derived the listbox class. I added a <code>MyListBox.cs</code> file in project:</p>
  
  <pre><code>namespace WSBSync
  {
      class MyListBox : ListBox
      {
          //some new methods and data members by me...
      }
  }
  </code></pre>
  
  <p>Following this <a href="https://stackoverflow.com/questions/13351652/how-to-use-a-c-sharp-custom-subclass-in-xaml">How to use a C# custom subclass in XAML</a>, I modified my xaml file namespace like this:</p>
  
  <pre><code>&lt;Window x:Class="WSBSync.MySettingWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:local="clr-namespace:WSBSync"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
  </code></pre>
  
  <p>and my custom UI here:</p>
  
  <pre><code>&lt;local:MyListBox x:Name="sourceListBox" SelectionChanged="mySelectionChanged"/&gt;
  </code></pre>
  
  <p>But I got an error during build: MyListBox doesn't exist in "clr-namespace:WSBSync"  namespace.</p>
  
  <p>I tried clean and rebuild my project, the error is still there.
  What am I missing or doing wrong?</p>