private void ScrollListViewToCurrentSelection()
 {
     if ((_currentSelectedIndex >= 0) && (_currentSelectedIndex < ItemsListView.Items.Count))
     {
         ItemsListView.SelectedIndex = _currentSelectedIndex;
         ItemsListView.ScrollIntoView(ItemsListView.SelectedItem);
         _currentSelectedIndex = -1;
     }
 }
        private void Scroll_Click(object sender, RoutedEventArgs e)
        {
            int numVal;

            if (Int32.TryParse(scrollId.Text, out numVal) && numVal >= 0 && numVal < ItemsListView.Items.Count)
            {
                var item      = (ComboBoxItem)ScrollAlignment.SelectedItem;
                var Alignment = (ScrollIntoViewAlignment)item.Tag;
                ItemsListView.ScrollIntoView(ItemsListView.Items[numVal], Alignment);
                scrollId.BorderBrush = ValidFormat;
            }
            else
            {
                scrollId.BorderBrush = InvalidFormat;
            }
        }