First of all Visibility
is set to Hidden
on your listBox. Remove that.
Second you need not to bind to View
property if CollectionViewSource is defined in XAML. WPF internally convert CollectionViewSource to ICollectionView
(ListCollectionView
in your case) when binded directly from XAML.
This is how you bind in XAML (Notice you have to set Source on binding and not directly):
<ListBox Name="lst" Width="130" Height="120" Panel.ZIndex="1"
ItemTemplate="{StaticResource MyTemplate}"
ItemsSource="{Binding Source={StaticResource X}}"
KeyDown="lst_KeyDown" PreviewTextInput="lst_PreviewTextInput"/>