Esempio n. 1
0
        public void OnScrollIntoView(int arg)
        {
            if ((QueueListview.Items.Count > arg) && (arg > -1))
            {
                QueueListview.ScrollIntoView(QueueListview.Items[arg]);

                ListViewItem lvi = QueueListview.ItemContainerGenerator.ContainerFromIndex(arg) as ListViewItem;
                if (lvi != null)
                {
                    lvi.Focus();
                }
            }
        }
Esempio n. 2
0
        public void OnScrollIntoViewAndSelect(int arg)
        {
            if ((QueueListview.Items.Count > arg) && (arg > -1))
            {
                QueueListview.SelectedItems.Clear();

                QueueListview.ScrollIntoView(QueueListview.Items[arg]);

                ListViewItem lvi = QueueListview.ItemContainerGenerator.ContainerFromIndex(arg) as ListViewItem;
                if (lvi != null)
                {
                    //QueueListview.ScrollIntoView(lvi);
                    lvi.Focus();
                    lvi.IsSelected = true;
                }
            }
        }