Problem with AutoScrollToSelectedItem

Apr 24, 2014 at 10:39 PM
Edited Apr 24, 2014 at 10:47 PM
Hi!

I'm using AutoScrollToSelectedItem, but I have a problem the selected item isn't fully visible because the scroll to bottom doesn't completed.
<ListBox ItemsSource="{Binding TarifaPadreVM.Vigencias}" 
SelectedItem="{Binding TarifaPadreVM.SelectedVigencia}"   Width="290" MaxHeight="165" 
Style="{DynamicResource  WildCat-Control-ListBox-Vigencias}"
controls:ListBoxEx.AutoScrollToSelectedItem="True" />


<Style TargetType="ListBox" x:Key="WildCat-Control-ListBox-Vigencias" 
BasedOn="{StaticResource Wildcat-Control- ListBox}">
<Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle" />
<Setter Property="controls:ListEx.Columns">
  <Setter.Value>

    <controls:ListColumnsCollection>

      <controls:ListColumn Header="Fecha Inicial" IsResizable="False" Width="125">
        <controls:ListColumn.ItemTemplate>
          <DataTemplate>
            <DatePicker SelectedDate="{Binding FechaInicial}" Width="100" 
            DisplayDate=" {Binding FechaInicial}" />
         </DataTemplate>
      </controls:ListColumn.ItemTemplate>
    </controls:ListColumn>

  </controls:ListColumnsCollection>

</Setter.Value>
</Setter>
</Style>
Help me please!
Coordinator
Apr 25, 2014 at 8:33 AM
Hmmm... that should work. Is there anything else that is special about this list? Like alignments or anything like that? Is there some way I can look at a repro example so I can debug through this?

FYI, to provide a little bit of background information: What this feature does behind the scenes is to use the standard WPF ScrollIntoView() method to show the item. So there shouldn't be much special going on there.


Markus