-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rework library for supporting dpi awareness: - All values returns in wpf units - Project update for StyleCop rules - Bugfix for SystemInformation.VirtualScreen returning only primary screen * Added test project for window position check (keep in mind that you should set WindowStyle="None" ResizeMode="NoResize" properties for window or you will get position problem. See dotnet/wpf#4127) * Fix for MONITORINFOEX initialization after code cleanup * Final changes WindowHelper added; Some fixes for SystemInformation; * code review * simplify build batch using dotnet tool * upgrade to netcoreapp3.1 because netcoreapp3.0 is out of support * bump version to v1.1.0 Co-authored-by: andbayd <andrew@monosnap.com> Co-authored-by: Michael Denny <micdenny@gmail.com>
- Loading branch information
1 parent
8908b86
commit 6714ca8
Showing
17 changed files
with
747 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace WpfScreenHelper.Enum | ||
{ | ||
public enum WindowPositions | ||
{ | ||
Center, | ||
Left, | ||
Top, | ||
Right, | ||
Bottom, | ||
TopLeft, | ||
TopRight, | ||
BottomRight, | ||
BottomLeft, | ||
Maximize | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
using System.Windows; | ||
|
||
namespace WpfScreenHelper | ||
namespace WpfScreenHelper | ||
{ | ||
using System.Windows; | ||
|
||
/// <summary> | ||
/// Provides helper functions for mouse cursor. | ||
/// </summary> | ||
public static class MouseHelper | ||
{ | ||
/// <summary> | ||
/// Gets the position of the mouse cursor in screen coordinates. | ||
/// </summary> | ||
public static Point MousePosition | ||
{ | ||
get | ||
{ | ||
NativeMethods.POINT pt = new NativeMethods.POINT(); | ||
var pt = new NativeMethods.POINT(); | ||
NativeMethods.GetCursorPos(pt); | ||
return new Point(pt.x, pt.y); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.