Releases
v1.0.0
SnapLayout.Trigger v1.0.0
Compare
Sorry, something went wrong.
No results found
[1.0.0] - 2025-01-27
Added
Initial release of SnapLayout.Trigger library
SnapLayoutTrigger.Initialize() method to enable Snap Layout functionality on WPF buttons
Mouse hover activation - Snap Layout popup appears on MouseEnter event
Mouse hold activation - Snap Layout popup appears after holding left mouse button for 400ms
Support for multi-monitor setups with automatic screen coordinate calculation
P/Invoke implementation using LibraryImport for Win32 API calls (keybd_event, SetCursorPos)
Comprehensive XML documentation for all public APIs
Example project demonstrating custom window chrome with Snap Layout integration
Unit test project with xUnit covering initialization and event handling scenarios
NuGet package metadata and configuration
MIT License
README.md with quick start guide and complete examples
Support for .NET 10.0-windows target framework
Technical Details
Uses Win+Z keyboard simulation to trigger native Windows 11 Snap Layouts
Automatic cursor positioning to button center for consistent behavior
Timer-based hold detection (400ms threshold)
Proper cleanup of event handlers and timers
Thread-safe implementation using WPF Dispatcher
Known Limitations
Requires Windows 11 (Snap Layouts feature)
Uses keyboard simulation which may be restricted in sandboxed environments
P/Invoke dependencies may require full trust execution context
You can’t perform that action at this time.