Unplanned
Last Updated: 22 Sep 2022 12:36 by ADMIN
Daniel
Created on: 17 Sep 2022 17:50
Category: UI for WPF
Type: Bug Report
0
DataError tooltip is on the wrong side of the control with red arrow pointing away from the control in error

Can be reproduced in the WPF demo (Windows8 theme): the error description tooltip appears on the left of the control and with the red arrow on the left (see attachment). The tooltip should appear on the same side of the red adorned element (the red triangle, top right corner) and the tooltip arrow should point the control.

Attached Files:
3 comments
ADMIN
Stenly
Posted on: 22 Sep 2022 12:36

Hello Daniel,

An alternative approach that I could suggest, instead of setting the SystemParameters.MenuDropAlignment property would be to modify the error tooltip. More specifically, remove the tooltip's arrow, which is displayed on the left. This way, even if the error tooltip is displayed on the left side of the control, it will not display the arrow and indicate that it is wrongly placed.

To achieve this result, extract the control template that is set to the Validation.ErrorTemplate property of the RadComboBox control for the Windows 8 theme. The ControlTemplate has an x:Name="ValidationToolTipTemplate". The template contains a ToolTip element with x:Name="PART_ToolTip", which displays the error message as well as the arrow. The arrow is defined in the control template that is set to the Template property of this tooltip element (it has an x:Name="ErrorTooltipTemplate"). This control template could be extracted as well and the Path element that is contained inside could be removed.

By following these steps, the produced result will be as follows:

With this being said, I have attached a sample project, so, could you give it a try?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files:
Daniel
Posted on: 19 Sep 2022 15:25

Thanks for the quick answer. Effectively, the second link (setting SystemParameters.MenuDropAlignment to false) solved the problem. I was afraid that it changed the setting system wide but it doesn't. I've added the code in all my WPF applications.

I think it is weird that the system is using a touch setting when the mouse is used and with desktop computer that has no touch screen.

ADMIN
Stenly
Posted on: 19 Sep 2022 13:52

Hello Daniel,

The reason for this could be due to the way that handedness settings of the Windows operating system and the native WPF Popup element work. Sometimes, depending on these settings, the popup could be misplaced, once it is opened. There is an interesting StackOverflow thread regarding this topic, which can be found here:

.net - WPF Handedness with Popups - Stack Overflow

With this being said, would it be possible to give the Popup Content Position article from our documentation a try? It shows two approaches that might prevent this behavior from occurring. The article can be found at the following link:

Popup Content Position | Telerik UI for WPF

In conclusion, could you give the suggested approaches from the Popup Content Position article and let me know if they help prevent this behavior from occurring?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.