Closed Benji-Yarmand closed 6 years ago
There is a bug when you try to dock on the LEFT on a secondary monitor. Inside ABSetPos the dimension.X property is negative (which throws an exception). Top, Bottom and Right work fine:
var rect = new Rect(location, new Size(dimension.X, dimension.Y)); info.DockedSize = rect;
I was able to get around this by explicitly testing for <0 and setting the X to what I need as the width of the AppBar:
// THIS IS A HACK TO GET THE LEFT DOCK WORKING ON THE SECOND MONITOR
if (dimension.X < 0)
{
dimension.X = 150;
}
var rect = new Rect(location, new Size(dimension.X, dimension.Y));
info.DockedSize = rect;
You might have a more elegant solution?
Thanks, Damon
This commit (rebased) was merged as part of #26 so I think this PR can be closed.
closing, as it was part of #26
When you drag the window to the seconds screen, if you snap it, it used to snap to the primary screen instead of current one.