Skip to content

Support for MessageDialog in Skia #4810

Closed

Description

@MartinZikmund

What would you like to be added:

Support for MessageDialog in Skia targets.

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.

Why is this needed:

UWP parity

For which Platform:

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

Anything else we need to know?

Activity

  1. added
    kind/enhancement
    triage/untriaged
    project/non-ui ⚙️
    and removed
    triage/untriaged
    on Dec 30, 2020
  2. MartinZikmund commented on Dec 30, 2020

    @MartinZikmund
    MemberAuthor

    When fixed, please re-enable showing dialog in SamplesApp App.OnActivated and App.DisplayLaunchArguments

  3. added
    difficulty/tbd
    on Feb 15, 2021
  4. trungnt2910 commented on May 1, 2021

    @trungnt2910
    Contributor

    Any updates on this issue? I really hate adding hacks and stuff for Gtk and WPF to make the shared code run.

  5. added
    difficulty/medium 🤔
    area/skia ✏️
    and removed
    difficulty/tbd
    on Jun 4, 2021
  6. MartinZikmund commented on Jun 4, 2021

    @MartinZikmund
    MemberAuthor

    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.

  7. trungnt2910 commented on Jun 6, 2021

    @trungnt2910
    Contributor

    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).

  8. MartinZikmund commented on Jun 6, 2021

    @MartinZikmund
    MemberAuthor

    @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?

  9. trungnt2910 commented on Jun 7, 2021

    @trungnt2910
    Contributor

    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?)

  10. jeromelaban commented on Jun 7, 2021

    @jeromelaban
    Member

    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)

  11. self-assigned this
    on Mar 7, 2022
  12. sakshi173 commented on Mar 23, 2022

    @sakshi173

    Verified this issue is fixed, Closed.
    Message Dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/skia ✏️difficulty/medium 🤔kind/enhancementproject/non-ui ⚙️

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions