MessageBox.Avalonia icon indicating copy to clipboard operation
MessageBox.Avalonia copied to clipboard

Lots of issues...

Open mysteryx93 opened this issue 2 years ago • 6 comments

I'm trying this MessageBox implementation. I'm seeing lots of issues with it.

  • EnterDefaultButton and EscDefaultButton just got implemented for default value, but that implementation is bulky and non-intuitive to use. I'd rather just pass the default button as an enumeration, and the control should know which one is the cancel button.
  • The message box has a minimize button; leaving very little space for the messagebox title
  • Focus is set to nothing by default, and "space" doesn't press the default button. Need to press Tab twice to select the button.
  • Once the button receives the focus with tab, it displays differently and not pretty; and selecting it with the mouse doesn't give the same visual effect
  • Button text is left-aligned and looks weird. I think center-aligned would be better
  • Setting styles (Unix/MacOs/Windows) on the MessageBox itself is kind of weird... it would make more sense to set that style at the application level!

Finally, I really think this (or a better implementation of this) should be part of Avalonia itself.

mysteryx93 avatar Dec 12 '21 03:12 mysteryx93

As i speak with avalonia native developers - msbox will never be a part of avaloniaui. If u wanna help - u may send some pr to improve this lib.

CreateLab avatar Dec 12 '21 07:12 CreateLab

~~Set styles~~ Remove styles Need to add style names for all

CreateLab avatar Dec 12 '21 07:12 CreateLab

~~Button content alignment ~~

CreateLab avatar Dec 12 '21 12:12 CreateLab

Why do you say MessageBox would never be part of Avalonia? Why are they not interested in this?

There are discussions about its implementation here

Btw your styling option is really neat -- and I would love to be able to set that style at the application level.

mysteryx93 avatar Dec 12 '21 17:12 mysteryx93

As we discuss with @kekekeks, some systems have no message box, some systems have just one window with popups, some systems have only one window and nobody has solution how to implement message box. This implementation support only with me and some community and has no relationships with main avalonia repo.

CreateLab avatar Dec 13 '21 11:12 CreateLab

some systems have only one window and nobody has solution how to implement message box.

This is easily solvable with an overlay over the specified top-level root (window) like UWP: https://docs.microsoft.com/en-us/windows/apps/design/controls/dialogs-and-flyouts/dialogs. UWP had to solve this same problem because mobile devices were full-screen apps with no windowing system.

robloo avatar Feb 17 '22 04:02 robloo