Repository navigation
Releases: omostan/SnapLayout.Trigger
Releases · omostan/SnapLayout.Trigger
Release list
SnapLayout.Trigger v1.0.3
[1.0.3] - 2026-03-04
Changed
- Replaced package icon (128x128 PNG) for better visual identification on NuGet.org
- Enhanced README.md with updated download badge for monitoring latest version and downloads on NuGet.org
SnapLayout.Trigger v1.0.2
What's Changed in v1.0.2
Added
- Package icon for better visual identification on NuGet.org
Full Changelog: v1.0.1...v1.0.2
SnapLayout.Trigger v1.0.1
[1.0.1] - 2026-03-04
Changed
- Migrated test framework from xUnit to NUnit for better Visual Studio integration
- Updated test project to use NUnit 4.3.1, NUnit3TestAdapter 4.6.0, and NUnit.Analyzers 4.5.0
- Refactored all test assertions to use NUnit's constraint-based model (
Assert.That()) - Updated GitHub Actions workflows to explicitly reference
SnapLayout.slnto resolve MSBuild ambiguity - Corrected .NET SDK version in CI/CD workflows to use stable .NET 10.0.x
Fixed
- Fixed XAML resource ordering issue in example project - moved
Window.Resourcesbefore content to preventStaticResourceresolution errors - Updated
coverlet.collectorpackage from 6.0.0 to 8.0.0 to address security vulnerabilities - Fixed GitHub Actions
publish.ymlworkflow path separators for cross-platform compatibility - Added explicit
ArgumentNullException.ThrowIfNull()validation inInitialize()method - Fixed MSBuild error "MSB1011" in GitHub Actions by specifying solution file in all dotnet commands
- Removed flawed reflection-based tests that checked WPF internals (event handler attachment tests)
- Replaced unreliable tests with meaningful property verification test
- Fixed GitHub Actions permissions error "Resource not accessible by integration" by adding
contents: writeandpackages: writepermissions to workflows - Fixed NuGet pack failure by removing
--no-buildflag from pack command in publish workflow - Added detailed logging and verification steps to pack process for better diagnostics
Added
- Comprehensive troubleshooting guide for GitHub publishing (
docs/GITHUB_PUBLISH_TROUBLESHOOTING.md) - Enhanced XML documentation with
<exception>tags forInitialize()method - Added
[TestFixture]attribute to test class for NUnit compatibility
Security
- Updated
coverlet.collectorfrom 6.0.0 to 8.0.0 (addresses Mend.io reported vulnerabilities)
SnapLayout.Trigger v1.0.0
[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
LibraryImportfor 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