title: Performance Issue with ListControl and Observable Dictionary WPF
body: <p>I have an itemsControl bound to an observable dictionary, showing both the Key and Value in two textboxes, 
  It takes about 15 seconds for the usercontrol to load. 
  I tried virtualizing stackpanels and switching it to either a listbox or using a regular dictionary, and the lag still occurs </p>
  
  <p>Any ideas what might be causing this, and how I can get it to load faster?</p>
  
  <pre><code> public partial class WordsView : UserControl, INotifyPropertyChanged
      {
          public WordsView()
          {
              InitializeComponent();
  
              Dictionarylist.ItemsSource = curDic;
          }
  
          private ObservableDictionary&lt;string,int&gt; cur_dic = new ObservableDictionary&lt;string, int&gt;(App.PredDic);
          public ObservableDictionary&lt;string, int&gt; curDic
          {
              get { return cur_dic; }
              set
              {
                  SetField(ref cur_dic, value, "curDic");
  
              }
          }
  }
  }
  </code></pre>
  
  <p>and my xaml</p>
  
  <pre><code>&lt;UserControl x:Class="Ez.Management.WordsView"
               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:Ez.Management"
                DataContext="{Binding RelativeSource={RelativeSource Self}}"
                xmlns:properties="clr-namespace:Ez.Properties" 
               xmlns:main ="clr-namespace:Ez"
               mc:Ignorable="d" 
               d:DesignHeight="300" d:DesignWidth="300"&gt;
         &lt;StackPanel&gt;
          &lt;Grid&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
              &lt;/Grid.RowDefinitions&gt;
  
              &lt;GroupBox Grid.Row="1" Header="Words"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto"/&gt;
  
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto"/&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;ItemsControl x:Name="Dictionarylist" ItemsSource="{Binding curDic}" VirtualizingStackPanel.IsVirtualizing="True"
      ScrollViewer.CanContentScroll="True"&gt;
                          &lt;ItemsControl.ItemsPanel&gt;
                              &lt;ItemsPanelTemplate&gt;
                                  &lt;VirtualizingStackPanel&gt;&lt;/VirtualizingStackPanel&gt;
                              &lt;/ItemsPanelTemplate&gt;
                          &lt;/ItemsControl.ItemsPanel&gt;
                              &lt;ItemsControl.ItemTemplate&gt;
                                  &lt;DataTemplate&gt;
                                      &lt;Grid Margin="3"&gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width="3*"&gt;&lt;/ColumnDefinition&gt;
                                              &lt;ColumnDefinition Width="1*"&gt;&lt;/ColumnDefinition&gt;
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;TextBlock Text="{Binding Key}" Grid.Column="0" /&gt;
                                          &lt;TextBlock Text="{Binding Value}" Grid.Column="1"/&gt;
                                      &lt;/Grid&gt;
                              &lt;/DataTemplate&gt;
                              &lt;/ItemsControl.ItemTemplate&gt;
  
  
                      &lt;/ItemsControl&gt;
  
                  &lt;/Grid&gt;
              &lt;/GroupBox&gt;
          &lt;/Grid&gt;
      &lt;/StackPanel&gt;
  
  &lt;/UserControl&gt;
  </code></pre>