Replies: 36 comments 2 replies
-
Would that allow hosting multiple ContentDialogs in the same thread in Xaml Islands? |
Beta Was this translation helpful? Give feedback.
-
There was a topic about looking at Content Dialog dismissal behaviour #2122 which perhaps could be a behaviour property of the ContentDialog. That way it could render within the window with Light Dismiss. Include as default, the current behaviour, and add a ModalWindow option, which will create a movable window with only a Close button, or Close and Minimise.
|
Beta Was this translation helpful? Give feedback.
-
I like where @mdtauk is headed here. I was thinking the same thing except for light dismiss but that's also an awesome idea and something I've implemented many times manually |
Beta Was this translation helpful? Give feedback.
-
But if it is modified as a modal window would it still have rounded corners, shadows, overlay? My guess is the modal window will still look like the old HWnd, having a rectangular border 🤦♂️. So it will be similar to a normal modal dialog with xaml content in it. If a user wants ContentDialog as a modal window, they can create a modal window with xaml content (maybe in the future?) Just keep ContentDialog the way it is. Or may be create a new ModalDialog control just for WinUI desktop for that scenario |
Beta Was this translation helpful? Give feedback.
-
In a more ideal situation we could associate the dialog with its Window using the Parent property, but I see that's not an option because a WinUI Window is not a FrameworkElement like a WPF Window is. It would almost seem to be inverting responsibility to have the Window passed to the ContentDialog, but not knowing the implementation details sometimes you have to do things like that to avoid other challenges.
The one other important dialog window is the non-modal dialog that is neither an overlay nor light dismiss. It gives the user the option to keep the contents of the dialog open so they can refer to the message contents while they continue working in the parent window that raised the dialog. What I am describing is pretty much another independent Window but it might be important to differentiate for other related calls, like maybe CloseAllDialogs() (as a random example). |
Beta Was this translation helpful? Give feedback.
-
@sylveon @mdtauk @ShankarBUS Having two controls is another path, but honestly, I'm not too fond of it. If WinUI already has a Control for content dialogs, we should extend it or readjust it. Having two controls is adding more confusion to the developers and creates additional maintenance costs. |
Beta Was this translation helpful? Give feedback.
-
Hey @marb2000, I understand the complexity of maintaining multiple controls with similar features. But....
|
Beta Was this translation helpful? Give feedback.
-
Hey @marb2000, Ignore what I said above # 1. Is not possible since WinUi doesn't yet support transparent borderless window # 2. Adjusting ContentDialog is a more viable option since it has Primary, Secondary buttons and many API which can't be reproduced easily while creating a new ModalDialog control. The modal-ContentDialog will look same UI wise but will be a top-level child window parented to a requested Owner window instead of overlay the xaml content like now, is this your proposal? I am okay with it since it will require less work 😅. But how will the users decide if it should be top-level child window or a xaml content overlay? What you proposed is good in a proper perspective 👏👏👏. Go for it. May be if WinUI support custom window styles, title bars and window chromes in the future, modal-ContentDialog can be modified to look exactly like how it is now with rounded corners and shadows |
Beta Was this translation helpful? Give feedback.
-
@ShankarBUS (in response to your first comment) It's really up to the Windows shell team to implement rounded corners and to modify the shadows of windows. They should do that but they unfortunately rejected that. Microsoft doesn't want consistency lmfao |
Beta Was this translation helpful? Give feedback.
-
So here are my ideas What @mdtauk, proposed is genius but it wouldn't allow a top-level non-modal dialog like @jtbrower said So may be do it like this : ViewMode
Behavior
Important Notes :Make the ViewMode & Behavior property not changeable once the dialog has been shown and it can throw some exception if tried to do so. This will ensure a proper UX @marb2000 A: A new Owner property which will have a Window as value (instead of a FrameworkElement as in the Parent property) can be introduced, this should solve what @jtbrower said. |
Beta Was this translation helpful? Give feedback.
-
Hey @Poopooracoocoo, come on man as a developer we know how hard it is to have consistency it may be code or UI. |
Beta Was this translation helpful? Give feedback.
-
What you are asking for requires a lot of underlying changes to the shell. Windows 10X is doing a lot of that, but Microsoft is reluctant to do anything that breaks compatibility, and so much Windows software handles their own window chrome, that making a wholesale change becomes very difficult. Until then minor changes can only happen to apps that don't modify their windows, for new apps that can be built with WinUI 3 as it's an opt in, or apps that are rewritten. |
Beta Was this translation helpful? Give feedback.
-
I've always considered it an improvement to have ContentDialog just overlay on top of the underlying window. It seems a lot simpler to handle as well. Seems like the correct solution would involve setting XamlRoot automatically. It should be behaving just like UWP. If that's not possible, better error messages as people learn are key. |
Beta Was this translation helpful? Give feedback.
-
Also see this discussion: #1679 |
Beta Was this translation helpful? Give feedback.
-
but they won't even update the style of the radio buttons. Microsoft updated many controls for Windows 8 and updated them again for Windows 10. They introduced a new style for radio buttons in WinUI but didn't restyle it in other frameworks.
as for the rounded corners, I was thinking of Windows 7. Microsoft also has control over Electron now and quite a bit of control over Chromium's integration with Windows. They could do a lot for consistency if they tried. Microsoft isn't going to use WinUI 3 for File Explorer. please let me be wrong @ShankarBUS yeah I do want instantaneous happiness. I'm very unhappy in my life for various reasons. Oops. ahem. Anyway, it'd be great for Microsoft's own products like Office. Apple has gotten their inbox apps to use native system controls (except the App Store I guess) and with Big Sur, their Catalyst apps now fit right in. Microsoft's rounded corners thing is half-arsed and I honestly completely doubt that they've committed (like any company nowadays smh). Maybe consistency doesn't matter as you said. idk |
Beta Was this translation helpful? Give feedback.
-
MacOS and iOS have this feature in their windowing model, and heavily utilize it in their document-based applications. Scenario is simple and very common. Suppose you have multi-window document based application, like Pages or Word or similar. Suppose that you want to implement asynchronous non-blocking document saving in background thread. All problems from filesystem would then be reported asynchronously, when user quite possible already works in another window. Original window need the ability to show the problem via ContentDialog, modally for originating window, but not modally for all other windows That is a highly valuable feature - "Window modal dialog", in addition to the usual "Application modal dialog" and "Non modal dialog". Note, that "Window modal dialog" could be emulated on Win32 and WinRT if windows are running on separate threads, but not when the application is single-threaded. This feature is implemented by AppKit on macOS https://developer.apple.com/design/human-interface-guidelines/macos/windows-and-views/dialogs/ and by UIKit on iOS, and is used by Pages and Word on those platforms. Even FileSavePicker dialog is shown as document-modal dialog, not as an application modal We at BeLight Software needs exactly this to make our Live Home 3D application multi-document on Windows (it is already multi-document on iOS and macOS) |
Beta Was this translation helpful? Give feedback.
-
@eugenegff this is what ContentDialog does today, show a dialog in the original window where you open it. Are you just saying you want to keep that original behavior in addition to options for more application modal dialogs? (Which in that scenario would confuse a user even more as they try to edit something in another window but are blocked from a dialog elsewhere?) |
Beta Was this translation helpful? Give feedback.
-
Doesn't ContentDialog have a maximum width issue that a new window wouldn't
have?
…On Wed, 8 Jul 2020 at 17:31, Michael Hawker MSFT (XAML Llama) < ***@***.***> wrote:
Original window need the ability to show the problem via ContentDialog,
modally for originating window, but not modally for all other windows.
@eugenegff <https://github.com/eugenegff> this is what ContentDialog does
today, show a dialog in the original window where you open it. Are you just
saying you want to keep that original behavior in addition to options for
more application modal dialogs? (Which in that scenario would confuse a
user even more as they try to edit something in another window but are
blocked from a dialog elsewhere?)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2848 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIEDQMB7XCXI2BAAYIC6F3R2SNOFANCNFSM4OSFRW6Q>
.
|
Beta Was this translation helpful? Give feedback.
-
@michael-hawker Not exactly. Today you can not show second ContentDialog in second AppWindow while first is still shown - that is the main limitation. https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.contentdialog?view=winrt-19041
The main purpose of window modal dialogs is to split windows into independently functioning entities, so that each can show them regardless of the state of other windows - that is how it function in other OSes. |
Beta Was this translation helpful? Give feedback.
-
Thanks @eugenegff, I forgot about that limitation; Yeah, I agree being able to show a ContentDialog per window would be a key requirement. |
Beta Was this translation helpful? Give feedback.
-
Without a thread per window. |
Beta Was this translation helpful? Give feedback.
-
Any update on this guys? |
Beta Was this translation helpful? Give feedback.
-
@akash07k wouldn't you just create a window directly vs. a dialog if there's no other UI for your app? I also want to link out to an article I found on usability as modal dialogs are generally an anti-pattern. So, want to make sure we're guiding developers to create the best experiences possible for their users. The number of times Outlook has popped up one that has prevented me from doing something in another window and confused me as a user is countless... |
Beta Was this translation helpful? Give feedback.
-
@michael-hawker |
Beta Was this translation helpful? Give feedback.
-
From the article (emphasis added):
I mean the difference between a dialog and a window are pretty minute from a user perspective, so I think terms and mechanics are getting conflated with the end result for your scenario. Currently the Yes, you want to open something that looks like a dialog for your specific app scenario, but since your app is running in the background, what you really need to do is just create a window. It'll just look like a dialog, but it doesn't have to be inheriting or using |
Beta Was this translation helpful? Give feedback.
-
Hmm, I understand you. |
Beta Was this translation helpful? Give feedback.
-
Instead of creating a new window each time you could merely hide an existing one, that way showing it is instant since it's already loaded in background. |
Beta Was this translation helpful? Give feedback.
-
Ya, I too was thinking about it |
Beta Was this translation helpful? Give feedback.
-
In my opinion, no ContentDialog shouldn't be a top-level modal because of the following UX issues:
|
Beta Was this translation helpful? Give feedback.
-
I think this could be achieved by setting ShouldConstrainToRootBounds to False internally in the ContentDialog logic could it not? Also probably additional logic might need to be added to update the ContentDialog's position when its parent window is moved (similar to Flyouts). |
Beta Was this translation helpful? Give feedback.
-
Today, the ContentDialog is just XAML content placed on the top of the visual tree. In WPF, ContentDialog is like a MessageBox, which is a modal top-level child window.
Discussion: Should the ContentDialog pivot towards a modal top-level child window?
In this way, ContentDialog won't need XamlRoot anymore. There are several customer complains that the need of XamlRoot is unintuitive for WPF/Win32 developers (e.g. #2504)
There are several questions that need to be answer:
How will the new top-level child ContentDialog work with the RequestedTheme feature?
Will the new ContentDialog work in XAML Islands scenarios? Will be still needed XamlRoot for Islands?
Beta Was this translation helpful? Give feedback.
All reactions