Posted 8 months ago by Dirk Zellerfeld
Avatar

I've seen the new overlay example in the recent major update which is awesome. I would like to show dialogs or messageboxes this way but I've noticed it needs to be defined in XAML and it appears you can only show one at the same time.

Would it be possible to improve it by adding a dialog system to it? Dialogs would need to queue itself. The call should be awaitable. I thought about a classic messagebox developers can use right away and a dialog where the content can be completely customized, similar to the processing queue but it should get queued into the dialog system and the call should be awaitable too.

await WindowChrome.ShowMessageboxAsync(message: "This is a test", title: "Hello World", WindowChrome.MessageboxButtons.OkCancel, WindowChrome.MessageboxIcons.Info);

await WindowChrome.ShowCustomDialogAsync(content: (DataTemplate)this.Resources["MyDataTemplate"], title: "Hello World");

[Modified 8 months ago]

Comments (1)

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dirk,

The WindowChrome overlays allow you to show any content in a fashion similar to a ContentControl (via OverlayContent, OverlayContentTemplate, and OverlayContentTemplateSelector properties), which is made visible by the IsOverlayVisible property.  While there is only a single overlay layer, you can stack multiple things within it if you wish, the same way you could with a normal ContentControl by using a Grid and overlaying multiple elements on top of each other.  The attached WindowChrome.OverlayContent property can be set to any element (like a Grid) and you can do so programmatically if you wish.  It doesn't have to be done in XAML.

I'm not sure we will add a dialog queue system to the overlays since I would think that most WPF apps would want to use external windows for dialogs.  We plan on adding themed versions of standard dialogs in the future.  That being said, you certainly could build such a dialog system on top of what we have already, using the mechanism described above.


Actipro Software Support

The latest build of this product (v21.1.3) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.