Pop Up Notification

5 posts, 0 answers
  1. Cuthahotha
    Cuthahotha avatar
    81 posts
    Member since:
    Sep 2008

    Posted 17 Feb 2011 Link to this post

    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.?
  2. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 18 Feb 2011 Link to this post

    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?
  3. DevCraft banner
  4. Cuthahotha
    Cuthahotha avatar
    81 posts
    Member since:
    Sep 2008

    Posted 18 Feb 2011 Link to this post

    I hadn't thought about it. Any chance you have some source or a style for a cut down version.
  5. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 18 Feb 2011 Link to this post

    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.
  6. Cuthahotha
    Cuthahotha avatar
    81 posts
    Member since:
    Sep 2008

    Posted 18 Feb 2011 Link to this post

    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.
Back to Top
DevCraft banner