Bug (?): Popup inside RadWindow

4 posts, 1 answers
  1. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 01 Sep 2008 Link to this post

    Here's the situation (pseudo xaml):

     
    <RadWindow> 
        [A bunch of stuff here] 
        <Popup> 
            <Canvas> 
                <RadMenu></RadMenu
            </Canvas> 
        </Popup> 
    </RadWindow> 

    I'm trying to simulate a context menu here. The idea is to set IsOpen to true on the popup when a row in a data grid is clicked, and then position the menu in relation to the canvas. Then when the Canvas is clicked I hide the popup. But after upgrading to version Q2 the entire popup appears behind the parent RadWindow. In the previous version this was not a problem. I'm guessing that this has something to do with the new layout model that you've introduced for the window component.
  2. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 01 Sep 2008 Link to this post

    I just read this post. Please ignore this.
  3. DevCraft banner
  4. hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 02 Sep 2008 Link to this post

    It turns out that this is not so easily solved after all. I've struggled with the RadPopup now for a couple of hours. I finally succeeded in displaying my context menu, but the positioning is wrong the first time I show it. When I close it and show it a second time the positioning is correct. I've attached the radpopup to a datagrid with the LogicalParent property: ( MyRadPopup.LogicalParent = MyDataGrid; ). That was the only way I could make the popup content display at all. The first time I show the popup it positions itself on the exact same position as the grid, which is not what I want. I want it in the top left corner of the browser window, like a normal Popup control. The weird thing is that when I close the popup and show it again, the positioning is correct. Is there a way to force the correct positioning on the first showing? And when will we see documentation and examples for the RadPopup control?
  5. Answer
    Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 03 Sep 2008 Link to this post

    Hi Henrik,

    With the latest update, we introduced a PopupManager that handles Z-Index on all popups (RadWindow, RadWindows with TopMost=true, and RadPopup - used in combobox, menuitem, datepicker, timepicker).

    The PopupManager exposes four zones: Window, TopWindow, Popup and DockWindow (for future use).
    If you want your popup (not RadPopup) to show on top you can set its Child Z-Index to be bigger then 300,000 (this is the starting Z-Index for Popup zone).

    I recommend that you use Popup control instead of RadPopup because RadPopup used to be a workaround for a bug in the Silverlight 2 platform and we might drop it from the future versions.

    As for the ContextMenu - we will most probably have it for the Q3 release.

    We apologize for any inconvenience we might have caused you.

    If you have other questions, drop us a line.

    Regards,
    Hristo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top