You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/enhancementNew feature or requestproject/non-ui ⚙️Categorizes an issue or PR as relevant to winrt (non-ui)
Maybe it would be worth considering rebuilding MessageDialog for all targets to use Uno UI, to have a unified experience. Currently native UI is used, which does not fit well with the rest of the app. A unified UI could be just based on ContentDialog, which is already available.
I think the easiest way to implement this is to use an extension interface and to implement the UI using ContentDialog in Uno.UI. This way the dialog would look the same on all existing and future targets and would reduce the need for platform-specific code. MessageDialog is discouraged by Microsoft anyway, so this sounds like a fair deal to me.
We still have to handle the Commands button and stuff, which WPF natively supports, and so does Gtk, so I still think that a native implementation would be easier (I have been using reflection hacks to add it as an extension to my apps, but it looks quite ugly).
@trungnt2910 my only objection against "native" MessageDialog is that it looks quite out of place in a "WinUI" app but it is true that it looks out of place in case of UWP too :-D . Would you be interested in trying to implement this for WPF or GTK?
I do have a full, standard-conforming implementation for GTK.
WPF supports 3 buttons, just like the docs, but it provides no options for changing the buttons' labels, so we must either mess up with Win32 API or implement our own form (I'd rather use a ContentDialog in this situation).
Or we might implement a basic "Yes" "No" "Cancel" "Ok" dialog (just like in WASM?)
We probably should be providing a way for the MessageDialog to be implemented by default with something coming from Uno.UI so it because available by default for platforms that don't provide a native implementation. (wasm is a good one as alert is pretty limited)
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/enhancementNew feature or requestproject/non-ui ⚙️Categorizes an issue or PR as relevant to winrt (non-ui)
Activity
MartinZikmund commentedon Dec 30, 2020
When fixed, please re-enable showing dialog in SamplesApp
App.OnActivatedandApp.DisplayLaunchArgumentstrungnt2910 commentedon May 1, 2021
Any updates on this issue? I really hate adding hacks and stuff for Gtk and WPF to make the shared code run.
MartinZikmund commentedon Jun 4, 2021
I think the easiest way to implement this is to use an extension interface and to implement the UI using
ContentDialogin Uno.UI. This way the dialog would look the same on all existing and future targets and would reduce the need for platform-specific code.MessageDialogis discouraged by Microsoft anyway, so this sounds like a fair deal to me.trungnt2910 commentedon Jun 6, 2021
We still have to handle the
Commandsbutton and stuff, which WPF natively supports, and so does Gtk, so I still think that a native implementation would be easier (I have been using reflection hacks to add it as an extension to my apps, but it looks quite ugly).MartinZikmund commentedon Jun 6, 2021
@trungnt2910 my only objection against "native"
MessageDialogis that it looks quite out of place in a "WinUI" app but it is true that it looks out of place in case of UWP too :-D . Would you be interested in trying to implement this for WPF or GTK?trungnt2910 commentedon Jun 7, 2021
I do have a full, standard-conforming implementation for GTK.
WPF supports 3 buttons, just like the docs, but it provides no options for changing the buttons' labels, so we must either mess up with Win32 API or implement our own form (I'd rather use a ContentDialog in this situation).
Or we might implement a basic "Yes" "No" "Cancel" "Ok" dialog (just like in WASM?)
jeromelaban commentedon Jun 7, 2021
We probably should be providing a way for the MessageDialog to be implemented by default with something coming from Uno.UI so it because available by default for platforms that don't provide a native implementation. (wasm is a good one as
alertis pretty limited)sakshi173 commentedon Mar 23, 2022
Verified this issue is fixed, Closed.
