Hello Telerik,
I get the following exception, when I try to get information about the color in Rectangle element:
[WPF Extension Error] Details: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.Media.GradientStopCollection.System.Collections.IEnumerable.GetEnumerator()
at Telerik.TestingFramework.XamlExtension.ClientProcessor.ObjectToString(Object obj, Boolean isAutomationPeer, Type objType)
at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command)
Code:
Thank you.
Kind Regards,
Stanislav Hordiyenko
I get the following exception, when I try to get information about the color in Rectangle element:
[WPF Extension Error] Details: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.Media.GradientStopCollection.System.Collections.IEnumerable.GetEnumerator()
at Telerik.TestingFramework.XamlExtension.ClientProcessor.ObjectToString(Object obj, Boolean isAutomationPeer, Type objType)
at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command)
Code:
var rect = app.MainWindow.Find.AllByType<
Rectangle
>();
var brush = rect[0].Fill as LinearGradientBrush;
var color = brush.GradientStops[0].Color; //here the exception is occurred
Thank you.
Kind Regards,
Stanislav Hordiyenko