Page 1 of 1

WPF Object Data Context

Posted: Mon Feb 06, 2017 8:49 pm
by rperneel
Hi All,

I am evaluating the possibility of changing from TestComplete to Ranorex and have a seemingly simple question. We have a WPF application, and I am trying to get access to the various UI object's data context variable. In the Spy tool I see a reference to the DataContext, but it is greyed out, and is listing ByRef<CLASSNAME>..... (See attached image)

Is there a way that I can get access to the datacontext in the spy? or is there a way in usercode I can get access? (have been using Ranorex for ~3 days)

Thanks.

Re: WPF Object Data Context

Posted: Tue Feb 07, 2017 12:13 pm
by odklizec
Hi,

A similar problem to yours has been discussed here:
http://www.ranorex.com/forum/casting-fr ... tml#p39450
Sadly, there is most probably no out-of-the-box solution. I would suggest to contact Ranorex support at [email protected] and request a sample code mentioned in that post.