Page 1 of 1

How to keep font in fixed size

Posted: 11 Jun 2019, 15:29
by Inuyasha123
If I customize the content in the UserControl, how to keep the font from being scaled when the content exceeds the size of the control

Re: How to keep font in fixed size

Posted: 11 Jun 2019, 16:22
by sfernandez
Could you please share the xaml corresponding to the UserControl to understand what is happening?

If I have to guess I imagine you have a Viewbox wrapping the contents of the UserControl. If you don't want to scale down the contents you can set the Viewbox StretchDirection="UpOnly", is that what you need?

Re: How to keep font in fixed size

Posted: 12 Jun 2019, 04:22
by Inuyasha123
Yes, you guessed it. I use a ViewBox to wrap a UserControl. The UserControl contains several Expander layouts, but when Expander expands, all fonts are automatically scaled by the Grid.

Re: How to keep font in fixed size

Posted: 12 Jun 2019, 04:28
by Inuyasha123
I still have a problem. I use Noesis on Unity and use the ListBox control. When I use the mouse wheel to slide, not only the scroll bar of the ListBox is scrolling, but the Unity camera is also scrolling because I am on the Unity camera. A script that handles mouse wheel swipes is mounted. Is there any particularly good way to handle Unity and Noesis events separately?

Re: How to keep font in fixed size

Posted: 12 Jun 2019, 11:12
by sfernandez
Could you please open this last question as another topic, it would be easier for other people looking for the same problem to find it that way.
Thanks for your collaboration.

Re: How to keep font in fixed size

Posted: 13 Jun 2019, 04:10
by Inuyasha123
OK