I have this line of code in my Test class:
I have taken it from this documentation page which indicates I can cast components on a Silverlight page to their "native" types (i.e. DataGrids, ComboBoxes, etc, instead of just returning FrameworkElement, which isn't serving its purpose in this case...)
Here's the example given in the Telerik documentation:
The problem is that I get a compile time exception that states:
Error: The type 'System.Windows.Forms.DataGrid' cannot be used as a type parameter 'T' in the generic type or method 'ArtOfTest.WebAii.Silverlight.FrameworkElement.As<T>()' There is no implicit reference conversion from 'System.Windows.Forms.DataGrid' to 'ArtOfTest.WebAii.Silverlight.FrameworkElement.'
This is the source of MUCH frustration w/my developers right now and we can't find how to resolve it. We get this compiler error regardless of which type of component we are attempting to cast the FrameworkElement to, whether it be a Silverlight component or something else, even a Telerik component, most frustrating of all.
Any help would be appreciated.
DataGrid grid = app.Find.ByName(
"cboResident"
).As<DataGrid>();
I have taken it from this documentation page which indicates I can cast components on a Silverlight page to their "native" types (i.e. DataGrids, ComboBoxes, etc, instead of just returning FrameworkElement, which isn't serving its purpose in this case...)
Here's the example given in the Telerik documentation:
Grid containerGrid = app.Find.ByText(
"SomeText"
).Parent(
"Grid"
).As<Grid>();
The problem is that I get a compile time exception that states:
Error: The type 'System.Windows.Forms.DataGrid' cannot be used as a type parameter 'T' in the generic type or method 'ArtOfTest.WebAii.Silverlight.FrameworkElement.As<T>()' There is no implicit reference conversion from 'System.Windows.Forms.DataGrid' to 'ArtOfTest.WebAii.Silverlight.FrameworkElement.'
This is the source of MUCH frustration w/my developers right now and we can't find how to resolve it. We get this compiler error regardless of which type of component we are attempting to cast the FrameworkElement to, whether it be a Silverlight component or something else, even a Telerik component, most frustrating of all.
Any help would be appreciated.