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

Pop Up Notification

4 Answers 156 Views
Window
This is a migrated thread and some comments may be shown as answers.
Cuthahotha
Top achievements
Rank 1
Cuthahotha asked on 18 Feb 2011, 03:57 AM
when my users receive a message via the app i would like to show a popop notification similar to how notifications work in windows.

I have placed a canvas as my root of my main window and all controls go on it and have sizes adjusted accordingly.

I have a stack panel in the bottom right of the window, placed directly on the canvas.  I place notifications in the pop up and then fire off a DoubleAnimation to fade it out.

My problem is with the RadWindow.  I can't figure out how to get the stack panel to be on top of it.  I've set the zindex on the stack panel to 1000000 (having read another post that talked about your popup control having a z index zone in the 300k range.

How do I cause a control to have a higher z index than your rad window.?

4 Answers, 1 is accepted

Sort by
0
hwsoderlund
Top achievements
Rank 1
answered on 18 Feb 2011, 10:21 AM
I do not think that is going to be possible. The RadWindow uses the Popup control internally, and will always take the top position. Have you considered using a small, stripped down RadWindow for your notification?
0
Cuthahotha
Top achievements
Rank 1
answered on 18 Feb 2011, 02:01 PM
I hadn't thought about it. Any chance you have some source or a style for a cut down version.
0
hwsoderlund
Top achievements
Rank 1
answered on 18 Feb 2011, 02:18 PM
I am afraid not. You would have to edit the RadWindow template in Blend to remove all the unnecessary chrome and stuff. But it just occurred to me that this might not work after all. You probably do not want to open your notification in a modal window, you want the user to be able to keep interacting with the current page, usercontrol or whatever. Right? If that is so, then you will have problems. Let us say that the user opens some kind of form that displayes in a maximized radwindow. Let us then say that as he/she is writing stuff in the form fields, your non-modal notification window pops up. Now, as soon as the user focuses on something within the edit form, that notification window will disappear to the back. If RadWindow had an AlwaysOnTop property, you would be fine, but it doesn't. You are probably better off using the Popup control directly to display your notification. That way your notification should stay on top of any radwindows that are displayed when the notification pops up. There is still one caveat though: Let us say that your notification pops up, and a millisecond after that the user opens a new (maximized) RadWindow. Your notification will instantly disappear behind the new RadWindow. But I still think that is about as good as it gets.
0
Cuthahotha
Top achievements
Rank 1
answered on 18 Feb 2011, 02:25 PM
Bingo.  The exact reason I had not considered the RadWindow.  I didn't want to get into a window hashing nightmare.

I like the idea of the generic popup. 

Thanks for the feedback.
Tags
Window
Asked by
Cuthahotha
Top achievements
Rank 1
Answers by
hwsoderlund
Top achievements
Rank 1
Cuthahotha
Top achievements
Rank 1
Share this question
or