avalonia-docs
avalonia-docs copied to clipboard
The window documentation should have an example of `Design.IsDesignMode`.
Hello.
I have started to use AvaloniaUI only recently, and I discovered that the design preview triggers the window events, in my case it's the Closing event.
I made this issue, but it turns out that it's by design, and you should use Design.IsDesignMode.
I think the window documentation (if to be precise, the "Prevent a window from closing" part) should state that there is the variable, because I didn't know about it until I made the issue.
Your PR is welcome.