Scroll Item Into View ListView - CSharp System.Windows.Forms

CSharp examples for System.Windows.Forms:ListView

Description

Scroll Item Into View ListView

Demo Code


using System.Windows.Threading;
using System.Windows.Controls.Primitives;
using System.Windows.Controls;
using System.Windows;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Specialized;
using System.Collections.Generic;
using System;//from  www. j a va2  s  .c  o  m

public class Main{
        static object ScrollItemIntoView_ListView(object sender)
        {
            ListView listView = sender as ListView;
            if (listView != null && listView.SelectedItem != null)
            {
                listView.ScrollIntoView(listView.SelectedItem);
            }
            return null;
        }
}

Related Tutorials