WPF table scroll

Best practices, code snippets for common functionality, examples, and guidelines.
jindrich.matous
Posts: 5
Joined: Wed Apr 05, 2017 9:39 am

WPF table scroll

Post by jindrich.matous » Wed Jun 07, 2017 2:26 pm

Hallo, I have WPF application and there is grid in dialog. I using FindSingle to get the object of Ranorex.Table. It works well. It is bound to other 2 grids. When I click on line onto first one, the data are showed into the other two.
I have some functionalities to checking in each row. When I use
FindSingle("?/?/tabpage[@name='Contract Issuer List']/?/?/table[@automationid='dtGrdVersions']/row[@index='" + row +"']") to access a row, it works. But click, focus, ensurevisible, touch not working on the row which is not currently visible in view (is scrolled out). I search for functionality to move to selected row or access to scrollbar to set which row will be visible.
It works me when I stepping +1 row ascendantly, but when I see fg. 10. row and I want to select first, It found the row with FindSingle, but click or touch functionality doesn't working.
Any idea, how to solve it?

JM

jindrich.matous
Posts: 5
Joined: Wed Apr 05, 2017 9:39 am

Re: WPF table scroll

Post by jindrich.matous » Wed Jun 07, 2017 2:48 pm

Whis is working when I debug project, but not when I run it a whole...:

table.Focus();
table.MoveTo();
Mouse.ScrollWheel(2200);

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: WPF table scroll

Post by asdf » Thu Jun 08, 2017 3:25 pm

Hi Jindrich,

Can you please post a snapshot of your application under test to this forum?`
Furthermore, please also post the RxPaths you are using for object recognition.

Kind regards,
asdf

RekhaG
Posts: 17
Joined: Fri Sep 22, 2017 12:47 am

Re: WPF table scroll

Post by RekhaG » Mon Oct 02, 2017 11:49 pm

Hi jindrich.matous,


Can you please tell me if you figure out a solution? I am running into the same issue currently.

Thanks,
Rekha

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: WPF table scroll

Post by asdf » Thu Oct 05, 2017 11:14 am

Hi,

Please post a Ranorex Snapshot of your application in the forum. Without any further information, it is very hard to help you with this problem.
Maybe, the code Jindrich posted works with some delays in it.

Code: Select all

table.Focus();
Thread.Sleep(2000);
table.MoveTo();
Thread.Sleep(2000);
Mouse.ScrollWheel(2200);