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

Inconsistent Position of DragAdornerTemplate on different PC's. #507

Open
beltoforion opened this issue Dec 5, 2024 · 0 comments
Open
Labels

Comments

@beltoforion
Copy link

Describe the bug
Inconsistent Position of DragAdornerTemplate on different systems.

When we deploy our software on different machines one system is showing the DragAdorner on the left side of the cursor, the other system is showing the DragAdorner on the right side of the cursor. This makes it impossible to center the adorner properly on both systems. It appears that the axis orientation used by the DragAdornerTranslation is flipped.

Both systems are running on 1920x1080 with 96DPI. One System is using windows 10, the other one Windows 11. That is why I originally thought this may be the problem. I'm now getting feedback that this does not seem to be depending on the OS and i'm out of ideas.

This is the xaml code:

<DataTemplate x:Key="CassetteSlotTemplate" DataType="{x:Type models:SlotModelBase}">
    <Grid x:Name="CassetteSlotGrid"
              dd:DragDrop.IsDragSource="True"
              dd:DragDrop.IsDropTarget="True"
              dd:DragDrop.DropHandler="{Binding }"
              dd:DragDrop.DragHandler="{Binding DataContext, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}, AncestorLevel=2}}"
              dd:DragDrop.DragAdornerTemplate="{StaticResource WaferDragDropAdornerTemplate}"
              dd:DragDrop.DragAdornerTranslation="75,0"
              dd:DragDrop.DropTargetAdornerBrush="{StaticResource PinStripeColor2}"
              Background="Transparent"
              AutomationProperties.AutomationId="{Binding AutomationId}">

Expected behavior
Regardless of the OS Version and display settings I would expect the same walue of DragAdornerTranslation to result in the same shift of the DragAdorner in the same direction.

Screenshots
The following screenshots illustrates the behavior:
dragdrop
Right Side: The Adorner Offset is Applied in a way that the AdornerTemplate is centered.
Left Side: On a different PC the same AdornerTranslationOffset is applied in a different direction and the AdornerTemplate is moved away from the cursor.

@beltoforion beltoforion added the Bug label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant