Skip to content

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

@sopgenorth

Description

@sopgenorth

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions