Z-Index for always-on-top

bc3tech

Seems to me that the RadMessageBox isn't getting its z-index set to a "high value" such that it shows up always on top on the screen.
I am using a grid to overlay a translucent RadBusyIndicator on the screen and ensure none of my controls are able to be hit while an operation is performed.
If an exception occurs, and RadDiagnostics kicks off a messagebox, or I simply code one up to pop, it shows up under this RadBusyIndicator panel.

Why? Because I have my panel's Canvas.ZIndex set to 99; so it's always on top of the other controls.
But how can I ensure the messagebox shows up on top? I'd like to see Z-index be static at 99 for the messagebox, and this documented somewhere. That way when somebody wants to do what I'm doing they know to have their overlay at index 98 so messagebox popups aren't obscured.

Lance | Tech Support Engineer, Sr.

In this case, instead of setting Z-Index you can just have the Canvas as the last item in the XAML (further down the page is higher on the UI) and it will naturally be on top of all the existing elements, but still be underneath any MessageBox.

I've written a demo that better explains it (attached). See my code comments on MainPage.xaml and run it without the debugger attached. In it I use a RadBusyIndicator that is on top of the other elements on the page, clicking the left appbar button will show/hide the BusyIndicator which effectively blocks/unblocks the UI elements and clicking the right appbar button will trigger an exception.

When the exception is unhandled, you'll see the RadDiagnostics appear on top of everything else.

Final Note: One of the advantages to the IsRunning property of the BusyIndicator is that it also handles the Visibility property, allowing you to block/unblock the UI. This way, you don't need the canvas. You'll see this in the demo.

This should have you up and running, but if you're still having trouble, send me the code that you're using for that view (or update my demo with your code) and I'll investigate further.

Regards,
Lance
Senior Support Specialist
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.