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

New Post: Problems with IntegerUpDown.

$
0
0
Okay, I finally managed to track down the issue with the context menu.

It seems that it is being caused by the default TextAlignment="Right" setting on the IntegerUpDown style. Removing this setting fixed the issue, but it also results in the content being left-aligned instead. I googled this issue and found the following forum post confirming the problem (which also applies to the regular TextBox control):

https://social.msdn.microsoft.com/Forums/vstudio/en-US/732a73d0-85fa-40e9-ad87-fb2c03452c75/wpf-textboxs-textalignment-changes-its-default-context-menu-items-alignment-as-well?forum=wpf

Unfortunately, their solution is to set the HorizontalContentAlignment to "Right" instead. This works fine with the regular TextBox control, setting the content to be right-aligned without mangling the context menu. However, it doesn't work at all for the IntegerUpDown control.

I wasn't able to get a working fix for this, so for now I'll just use TextAlignment="Left" as a workaround. This is fine for my current project, so I'm done here. I'll submit this as an issue, and hopefully this bug will be fixed next time I come back to it.

Thanks!

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>