WPF style properties?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
lustuyck
Posts: 3
Joined: Fri Dec 07, 2012 11:12 am

WPF style properties?

Post by lustuyck » Fri Dec 07, 2012 11:15 am

Hi,

we can successfully use Ranorex to test our WPF application. However, it is unclear to us how we can test styles. If validation errors are shown in the form, an exclamation mark is put next to the control and a red border appears around the control.

How can we use Ranorex to test that this style is actually applied to the controls in case of a validation error? Style does not seem to appear in the properties of a control.

Thanks,
L

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: WPF style properties?

Post by Support Team » Fri Dec 07, 2012 1:02 pm

Hi,

Could you post us two Ranorex Snapshot files of the control, one when there is the exclamation mark and the red border and one when there is no mark, this will help us to find a solution for this issue.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.

Thanks,
Markus
.
Image

lustuyck
Posts: 3
Joined: Fri Dec 07, 2012 11:12 am

Re: WPF style properties?

Post by lustuyck » Mon Dec 10, 2012 9:17 am

Hi,

thank you for the answer. I added the snapshots and an image of the window in a zip file (attachment). before.rxsnp is the window before validation, after.rxsnp is the window after validation, screenshot.png is the window that shows the validation indications.

Thanks for the help!
Attachments
snapshots.zip
(555.69 KiB) Downloaded 191 times

lustuyck
Posts: 3
Joined: Fri Dec 07, 2012 11:12 am

Re: WPF style properties?

Post by lustuyck » Mon Dec 10, 2012 4:42 pm

Additional information: it seems I would have to be able to get the control template of a control, to get the Border element and check the color of it. Is this possible?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: WPF style properties?

Post by Support Team » Tue Dec 11, 2012 3:18 pm

Hello,

Thank you for the snapshot files.
I checked the files and was not able to find a property which can be used to distinguish if there is a red border around the control or not. You could try to set a property, e.g. 'AccessibleDescription' in your application which can be accessed by Ranorex to test this behavior.

Ragards,
Bernhard
.
Image