title: Listbox last element incorrect rendering
body: <p>I got trouble with the listbox. Please, check the screenshot down there. The last element is kind of "eaten" by the listbox external border (I defined appropriate MaxHeight). Can someone help me? </p>
  
  <pre><code>&lt;DataTemplate x:Key="QCTemplate"&gt;
      &lt;Grid&gt;
          &lt;Expander x:Name="expander" Header="{Binding}"&gt;
              &lt;Expander.HeaderTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel Orientation="Vertical"&gt;
                          &lt;TextBox Name="ComponentNameTextBlock" Style="{StaticResource BorderlessTextBoxStyle}" Text="{Binding ComponentName, Mode=TwoWay}" /&gt;
                          &lt;Grid&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                                  &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;TextBlock Grid.Column="0" Margin="1"&gt;Количество цитат:&lt;/TextBlock&gt;
                              &lt;TextBlock Name="ComponentVolumeTextBlock" Grid.Column="1" Margin="1" Text="{Binding Volume}" /&gt;
                          &lt;/Grid&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/Expander.HeaderTemplate&gt;
  
              &lt;!-- Контекстное меню экспандера --&gt;
              &lt;Expander.ContextMenu&gt;
                  &lt;ContextMenu&gt;
                      &lt;MenuItem Header="Оригинал 'My Clippings.txt'"&gt;
                          &lt;MenuItem Header="Удалить из оригинала..." 
                                    Command="{StaticResource ResourceKey=DeleteFromMyClippingsCommand}"
                                    CommandParameter="{Binding}" /&gt;
                      &lt;/MenuItem&gt;
                   &lt;/ContextMenu&gt;
              &lt;/Expander.ContextMenu&gt;
  
              &lt;!-- Внутреннее содержание экспандера --&gt;
              &lt;Grid Name="ExpanderContentContainer" 
                    Height="{Binding ElementName=ComponentChildsListBox, Path=ActualHeight}"&gt;
  
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width="25" /&gt;
                      &lt;ColumnDefinition Width="*" /&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
  
                  &lt;Grid.RowDefinitions&gt;
                      &lt;RowDefinition Height="*" /&gt;
                  &lt;/Grid.RowDefinitions&gt;
  
                      &lt;Rectangle Grid.Column="0" Grid.Row="0"
                                 Width="2" Height="{Binding Path=ActualHeight}"
                                 Fill="Black" 
                                 Margin="2"                               
                                 /&gt;
                  &lt;StackPanel Orientation="Vertical" 
                              Grid.Column="1" Grid.Row="0"&gt;
                      &lt;TextBox Name="ComponentCommentTextBox" 
                               Text="{Binding Comment, Converter={StaticResource ResourceKey=QCCCommentConvrtr}, Mode=TwoWay}"
                               BorderThickness="0"
                               GotFocus="ComponentCommentTextBox_GotFocus"
                               Margin="1"
                               /&gt;
  
                      &lt;ListBox Name="ComponentChildsListBox"
                               BorderBrush="Transparent"
                               ItemsSource="{Binding ChildsCollection}"
                               ScrollViewer.CanContentScroll="False"
                               MaxHeight="300" 
                               Margin="1"
                               Style="{StaticResource LibraryViewListBoxStyle}"
                               /&gt;
                  &lt;/StackPanel&gt;
              &lt;/Grid&gt;
          &lt;/Expander&gt;
      &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/ugDbe.png" rel="nofollow">Screenshot</a></p>