This project is read-only.

Problem with AutoScrollToSelectedItem

Apr 24, 2014 at 11:39 PM
Edited Apr 24, 2014 at 11:47 PM

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">


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


Help me please!
Apr 25, 2014 at 9: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.