title: Showing many images in a WPF view overheads too much memory
body: <p>I am developing a WPF application and I need to show 7200 images in a window.
  Each image size is equals to 300x300.
  My code "*.xaml" is showed below:</p>
  
  <pre><code>  &lt;ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"&gt;
          &lt;ItemsControl ItemsSource="{Binding Results}"&gt;
              &lt;ItemsControl.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;StackPanel Orientation="Vertical"/&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ItemsControl.ItemsPanel&gt;
              &lt;ItemsControl.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="180"&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="40" /&gt;
                              &lt;ColumnDefinition Width="180" /&gt;
                              &lt;ColumnDefinition Width="180" /&gt;
                              &lt;ColumnDefinition Width="180" /&gt;
                              &lt;ColumnDefinition Width="180" /&gt;
                              &lt;ColumnDefinition Width="180" /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                              &lt;Grid Grid.Column="0" Margin="2"&gt;
                                  &lt;Label Content="{Binding Frame}" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
                              &lt;/Grid&gt;
                              &lt;Grid Grid.Column="1" Margin="2"&gt;  
                                  &lt;Grid.Background&gt;
                                      &lt;ImageBrush ImageSource="{Binding FrameImage}"/&gt;
                                  &lt;/Grid.Background&gt;
                                  &lt;Image Source="{Binding FrameImage}"/&gt;
                              &lt;/Grid&gt;
                              &lt;Grid Grid.Column="2" Margin="2"&gt;
                                  &lt;Grid.Background&gt;
                                      &lt;ImageBrush ImageSource="{Binding FrameMatch}"/&gt;
                                  &lt;/Grid.Background&gt;
                                  &lt;Image Source="{Binding FrameMatch}"/&gt;
                              &lt;/Grid&gt;
                              &lt;Grid Grid.Column="3" Margin="2"&gt;
                                  &lt;Grid.Background&gt;
                                      &lt;ImageBrush ImageSource="{Binding ObjMatch}"/&gt;
                                  &lt;/Grid.Background&gt;
                                  &lt;Image Source="{Binding ObjMatch}"/&gt;
                              &lt;/Grid&gt;
                              &lt;Grid Grid.Column="4" Margin="2"&gt;
  
                                  &lt;Image Source="{Binding ObjImage}"/&gt;
                              &lt;/Grid&gt;
                              &lt;Grid Grid.Column="5" Margin="2"&gt;
                                  &lt;Label Content="{Binding Fitness}" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
                              &lt;/Grid&gt;
                          &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ItemsControl.ItemTemplate&gt;
          &lt;/ItemsControl&gt;
     &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>The problem is that the program consume to much memory.
  It is possible to overcome this problem ?
  Can anybody give me a solution ?</p>