mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-13 13:44:57 +00:00
BrowserWindow: Add OnBoundsChanged event
While not being an original Electron event, this one includes the bounds values, saving the additional roundtrip for calling GetBoundsAsync
This commit is contained in:
@@ -186,6 +186,19 @@ public class BrowserWindow : ApiBase
|
||||
remove => RemoveEvent(value, Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Emitted when the window is moved or resized.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// While not being an original Electron event, this one includes the bounds values,
|
||||
/// saving the additional roundtrip for calling <see cref="GetBoundsAsync"/>.
|
||||
/// </remarks>
|
||||
public event Action<Rectangle> OnBoundsChanged
|
||||
{
|
||||
add => AddEvent(value, Id);
|
||||
remove => RemoveEvent(value, Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// macOS: Emitted once when the window is moved to a new position.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user