title: How is CollectionViewSource used in XAML?
body: <p>Having the following XAML in my UserControl, I don't see anything in the ListBox:</p>
  
  <pre><code>&lt;UserControl x:Class="SampleProject1.AutoCompleteTextBox"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           xmlns:local="clr-namespace:SmartSender.NET"
           xmlns:sys="clr-namespace:System;assembly=mscorlib"
           mc:Ignorable="d" 
           d:DesignHeight="400" d:DesignWidth="600"&gt;
  &lt;UserControl.Resources&gt;
      &lt;x:Array Type="{x:Type sys:String}" x:Key="HTML5Tags"&gt;
          &lt;sys:String&gt;&amp;lt;html&amp;gt;&lt;/sys:String&gt;
          &lt;sys:String&gt;&amp;lt;body&amp;gt;&lt;/sys:String&gt;
          &lt;sys:String&gt;&amp;lt;head&amp;gt;&lt;/sys:String&gt;
      &lt;/x:Array&gt;
      &lt;CollectionViewSource x:Key="X" Source="{StaticResource HTML5Tags}" /&gt;
  &lt;/UserControl.Resources&gt;
  &lt;Canvas&gt;
      &lt;Canvas.Resources&gt;
          &lt;DataTemplate x:Key="MyTemplate"&gt;
              &lt;StackPanel Orientation="Horizontal" VerticalAlignment="Center"&gt;
                  &lt;Ellipse Width="7" Height="7" Fill="Blue" /&gt;
                  &lt;TextBlock Margin="6,0" FontFamily="Courier New" Height="16" 
                             Text="{TemplateBinding Content}" /&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/Canvas.Resources&gt;
  
      &lt;TextBox Name="txt" Canvas.Left="0" Canvas.Top="0" KeyDown="txt_KeyDown"
               PreviewTextInput="txt_PreviewTextInput" /&gt;
      &lt;ListBox Name="lst" Width="130" Height="120" Panel.ZIndex="1" 
               Visibility="Hidden" ItemTemplate="{StaticResource MyTemplate}" 
               ItemsSource="{StaticResource X.View}"
               KeyDown="lst_KeyDown" PreviewTextInput="lst_PreviewTextInput"/&gt;
  &lt;/Canvas&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have tried with both <code>X</code> and <code>X.View</code> as <code>ItemsSource</code>. What am I doing wrong here?</p>