Пример #1
0
        private double GetListViewOffset()
        {
            Point firstViewPosition = SourceWatchControl.TransformToAncestor(GridWithListViews)
                                      .Transform(new Point(0, 0));

            Point thierdViewPosition = DestinationeWatchControl.TransformToAncestor(GridWithListViews)
                                       .Transform(new Point(0, 0));

            return(thierdViewPosition.X - firstViewPosition.X);
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();

            SourceWatchControl.ItemsSource = Enumerable.Range(1, 10000);
            NavigateToListViewItemIndex(700);

            ProjectionWatchControl.ItemsSource   = Enumerable.Range(1, 10000);
            ProjectionWatchControl.SelectedIndex = 2;
            ProjectionWatchControl.ScrollIntoView(ProjectionWatchControl.SelectedItem);

            DestinationeWatchControl.ItemsSource   = Enumerable.Range(1, 10000);
            DestinationeWatchControl.SelectedIndex = 999;
            DestinationeWatchControl.ScrollIntoView(DestinationeWatchControl.SelectedItem);
        }