0

I have an usercontrol in wpf window. In usercontrol, I have put all the controls inside the viewbox so that if the user resize the window it does not effect the scaling of the usercontrol.

<Viewbox >
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition/>
    </Grid.ColumnDefinitions>
 ---------------------------
 ---------------------------
</Grid>
    </Viewbox>

In the first image, when the window is not maximized the usercontrols controls are coming as below i.e. small and blurry. Size of the controls are not constant.

enter image description here

if the user maximized the window, the usercontrol is coming fine as below:

enter image description here

Kindly suggest how to solve this issue?

Thanks

Community
  • 1
  • 1
Tarun
  • 393
  • 1
  • 6
  • 22

1 Answers1

0

Check this out: TextBlock inside a Viewbox - strange rendering

And try playing with TextOptions.TextFormattingMode values on Viewbox (assuming the controls n the screenshot are rendered as text with fonts, not bitmapimages.

Community
  • 1
  • 1
zaitsman
  • 8,984
  • 6
  • 47
  • 79