DataTemplate/UISpy control issues

Jul 21, 2008 at 11:01 PM
For some reason UISpy doesn't always pick up controls like TextBlocks if they're defined within a DataTemplate (or at least i think that's what the problem is)

Specifically i have a TextBlock defined within a DataTemplate, and this DataTemplate is referenced by a ContentControl, and this ContentControl is set to the Content property of an Expander (which is of ControlType.GroupBox btw)

When i use UISpy on the application it doesn't see this TextBlock within the DataTemplate within the ContentControl within the Expander.

Does anybody know why this is?

Does anybody know how to actually get the TextBlock in this situation?

thanks,
travis
Coordinator
Jul 22, 2008 at 7:42 PM
Have you tried looking in the RawView in UISpy. If you do find it?
- do let me know, I would probably add it to white in next release (may be, if not there is a way of using Raw elements in white next release anyway)
Jul 22, 2008 at 11:29 PM
Ok so i can see the textblock controls and all their properties in the raw view the problem is i need to get a hold of them somehow...

From what it sounds like there's no way to access raw controls with the current release of White. 
Do you know of any other possible way i can access a raw control?

thanks,
travis
Jul 23, 2008 at 7:45 PM
RawViewWalker does the trick for now.

thanks,
travis