This is a migrated thread and some comments may be shown as answers.
Validation Adornment and Collapsed Expander
3 Answers 13 Views
This is a migrated thread and some comments may be shown as answers.
Reilly
Top achievements
Rank 1
Reilly asked on 13 Apr 2018, 12:40 PM

In the attached very simple project, the main window has a single RadExpander containing a single RadNumericUpDown control. The Viewmodel adds a validation rule which always sets the only property (MyValue) as failed. (I tried to attach files but your system no longer lets me!)

When the RadExpander.IsExpanded property is set to false (as in the attached code), and you then expand it, you'll see the RadNumericUpDown appears normally, without any validation error adornment.

If you change RadExpander.IsExpanded property in the xaml to true and you run, you'll see the RadNumericUpDown has the validation error adornment and shows the error tooltip.

Why? If you use either Snoop or the VS tools, you'll see that the RadNumericUpDown has the error in both cases.

I'm using 2017.3.1018.45 on Win 10 x64.

Thanks.

-John.

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 18 Apr 2018, 10:03 AM
Hi John,

I cannot see any attachments to your reply. Please note that the forum allows you to attach only pictures. In the general case to attach a project you can open a new support ticket from your telerik.com account. 

As for your scenario, may I ask you to prepare some runnable code snippets and post them here? This will allow me to get a better idea of your case and investigate what is going on. 

Thank you for any help you can provide.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Reilly
Top achievements
Rank 1
answered on 18 Apr 2018, 11:50 AM

Hi Martin,

Thanks for responding. I can't open a new support ticket to attach the sample project; I don't have support.

But it doesn't matter, as I found the solution.

I found that the stock WPF Expander widget also exhibits this behavior. So I googled it. Of course StackOverflow had addressed it:

   https://stackoverflow.com/questions/10978222/wpf-expander-validation-error-not-shown-when-expanded

In short, this is known behavior. The workaround is to wrap the control (i.e. RadNumericUpDown) inside of an AdornerDecorator element. I don't understand WPF well enough to know why this is necessary, but it fixes the problem.

Thanks.

-John.

0
Martin Ivanov
Telerik team
answered on 18 Apr 2018, 12:28 PM
Hello John,

Thank you for sharing your solution here.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Asked by
Reilly
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Reilly
Top achievements
Rank 1
Share this question
or