Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Coded UI Testing works for everything except Extended.Wpf.Toolkit controls

$
0
0
Hi,

The Xceed Toolkit doesn't support AutomationID yet. But here's a solution if you want to set the AutomationID on the TextBox's part of the NumericUpDowns.

Instead of getting the Nuget Package, go to the sourceCode section on codeplex (https://wpftoolkit.codeplex.com/SourceControl/latest) and download the latest sources. In your solution, Add an existing project, and choose the Xceed.Wpf.Toolkit.csproj that you just downloaded. Make sure to reference this Xceed.Wpf.Toolkit.dll in your project.

Then, go in file :
-Xceed.Wpf.Toolkit/NmericUpDown/Themes/Aero2.NormalColor.xaml (for Windows8 and up)
-Xceed.Wpf.Toolkit/NmericUpDown/Themes/Generic.xaml (for other Windows)

In the "PART_TextBox", Add the following property :
AutomationProperties.AutomationId="{TemplateBinding AutomationProperties.AutomationId}"

This will make sure the AutomationID you set on the NumericUpDown will be translated to its TextBox.

Also, make sure to remove the AutoSelect override. For this, go in file
-Xceed.Wpf.Toolkit/AutoSelectTextBox/Implementation/AutoSelectTextBox.cs
and remove the static constructor. This will remove the override on AutomationID property.

Your XAML is good

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

Viewing all articles
Browse latest Browse all 2157

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>