praveen_l_singh
11 years agoOccasional Contributor
WPFObject grid
Hi, I am unable to retrieve cell value from wpf object grid. Have tried different options but it didn't work. Object hirarchy is below. Can you pls suggest? NameMapping.Sys.Proce...
- 11 years agoI was running in a similar problem with WPF testing.
I ended up using the FileChild routine to drill down through a large number of levels.
What I use is:
Set toolgrid = animPanel.FindChild("Name", "WPFObject(""Tool_Grid"")", 19)
Set wpfHP = toolgrid.FindChild("Name", "WPFObject(""Gauge_HP"")", 9)
Set gaugeHP = wpfHP.FindChild("Name", "WPFObject(""MyReading"")", 9)
Where animPanel was preiously defined for the user control UI.
The toolgrid is the top level of the WPF components within the animation pannel.
The wpfHP is a branch top for the gauge I want to read.
gaugeHP is where the actual value I want to read.
I also found this to be 10 times faster to initilize than specifying a single, very long, Set statement.
Don't ask me why it would be faster, I have a Forum topic started on the why.
it also makes it easier to debug, less likely to break should the developer makes a change, and easier to read.