Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop Controls scale incorrectly with Viewbox on 4k screens #101

Open
sopgenorth opened this issue Jan 31, 2023 · 0 comments
Open

Comments

@sopgenorth
Copy link

With a 4K screen, wrapping an object (e.g., textBlock) in a ViewBox that's set to NaN for height/width and stretch, the drag-and-drop controls grow excessively in size.

If a height and width are set for the ViewBox though, then the controls are normal-sized.

Here's a picture of the issue:
Giant Controls

And the XAML in a simple example:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Width="640"
        Height="480">
  <Canvas>
    <Grid Width="120" Height="100">
      <Viewbox Canvas.Left="246" Canvas.Top="184">
        <TextBlock Text="TextBlock" />
      </Viewbox>
    </Grid>
  </Canvas>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant