This is a migrated thread and some comments may be shown as answers.

Z-Index for always-on-top

2 Answers 266 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bc3tech
Top achievements
Rank 2
bc3tech asked on 25 Jun 2014, 04:36 AM
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.

2 Answers, 1 is accepted

Sort by
0
bc3tech
Top achievements
Rank 2
answered on 25 Jun 2014, 04:37 AM
I should add that I had hopes that some other "high value" was being used so I tried values 50, 10, and finally 2. Even a z-index of 2 would overlay any RadMessageBox popups.
0
Accepted
Lance | Manager Technical Support
Telerik team
answered on 25 Jun 2014, 01:25 PM
Hi Brandon,

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.

 
Tags
MessageBox
Asked by
bc3tech
Top achievements
Rank 2
Answers by
bc3tech
Top achievements
Rank 2
Lance | Manager Technical Support
Telerik team
Share this question
or