Label in GridSplitter

Mar 5, 2010 at 11:42 AM
Edited Mar 5, 2010 at 11:44 AM

Hi

I have a Label in a GritSplitter, but White can't find it

 

Thumb thumb = panel.GetThumb(SearchCriteria.ByAutomationID("id"));

Label label = thumb.Get<Label>(SearchCriteria.ByAutomationID("id"));

 

=> Null Reference Exception

Thumb thumb = panel.GetThumb(SearchCriteria.ByAutomationID("id"));

AutomationElement element = thumb.GetElement(SearchCriteria.ByAutomationID("id"));

Label label = new Label(element, thumb.ActionListener);

 

work

 

Note: the label is developed as TextBlock in a Template (xaml)

 

Throndorin

Coordinator
Mar 8, 2010 at 4:54 PM

can you provide some sample for AUT

Mar 9, 2010 at 8:23 AM
Edited Mar 9, 2010 at 9:21 AM

Hi

I can only show the xaml code ,and maybe the way how we the devoloper designed it. :(

I'm not very experienced in desiging UI with wpf, maybe our developer can create a short application, if he found time for that.

 

This is seems to be not a located problem = > I have found several things where I use the way over the AutomationElement, because White does not find the element himself

 

an other problem is a label in a WPF GridViewCell (GridView from WPFToolkit). if there is a template used for the cell to create for example italic style the label can also found only over AutomationElement.

 

Throndorin