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

ChildWindow moving issue #74

Closed
BaranPiotr opened this issue Jun 23, 2018 · 1 comment · Fixed by #96
Closed

ChildWindow moving issue #74

BaranPiotr opened this issue Jun 23, 2018 · 1 comment · Fixed by #96
Labels
Milestone

Comments

@BaranPiotr
Copy link

When I set VerticalContentAlignment to Bottom and AllowMove to true i can move ChildWindow maximum to half of parent. I think this is issue witch calculate offsets and for testing this concept I change the calculate offset in ProcessMove method in clone repository from

var widthOffset = width / 2 - this.partWindow.RenderSize.Width / 2;
var heightOffset = height / 2 - this.partWindow.RenderSize.Height / 2;

to

var offset = VisualTreeHelper.GetOffset(this.partWindow);
var widthOffset = offset.X;
var heightOffset = offset.Y;

After these changes issue with moving will disappear.
I don't know if this is a the best way to fix this issue.

@punker76 punker76 added the Bug label Sep 12, 2019
@punker76 punker76 added this to the 2.0.0 milestone Sep 12, 2019
punker76 added a commit that referenced this issue Sep 12, 2019
When VerticalContentAlignment is set to Bottom and AllowMove to true then the ChildWindow can be moved only to the maximum half of parent.
Use now VisualTreeHelper.GetOffset to fix this.
punker76 added a commit that referenced this issue Sep 12, 2019
(GH-74) Fix ChildWindow moving issue
@punker76
Copy link
Owner

@BaranPiotr Your suggestion have been merged, thanks for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants