CanUserClose on Docking backdoor

7 posts, 0 answers
  1. Adiel
    Adiel avatar
    60 posts
    Member since:
    Jun 2012

    Posted 28 Apr 2009 Link to this post

    Hi
    I set the CanUserClose property on RadPane to false and the close button doesn't apeare (witch is good)
    But if I change the pane to Tabbed and then drag it there is close button on the container so the user Can close it.
    is it a bug?
    update: there is no need to change it to tabbed just to floating.

    Thanks
    Adiel
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 28 Apr 2009 Link to this post

    Hello Adiel,

    You shouldn't be able to close it if it is in the DocumentHost (TabbedDocument). If it is in a window and you close the window, the pane is not actually closed. Just the window that contains it gets closed. It is not actually a bug. The problem is that you cannot stop it, except if you make your pane unable to float (set the CanFloat property to False). Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. DevCraft banner
  4. Adiel
    Adiel avatar
    60 posts
    Member since:
    Jun 2012

    Posted 28 Apr 2009 Link to this post

    Hi
    But if the CanFlow is false and it's in tabbed there is no way (for user) to get it back to orginal place...
    Thanks
    Adiel
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 Apr 2009 Link to this post

    Hi Adiel,

    Yes, this is a serious problem. I created a workaround, but it is not simple and straight-forward so we decided to extend the API of the docking control. Tomorrow (1st of May) we will publish internal build in the Latest Internal builds section and you will be able to download it with the new API. We will add 2 events to the RadDocking control - PreviewWindowClose and WindowClose and the first one will be a "preview" that can be stopped. You will be able to stop closing of all windows, that contain panes that cannot be closed with this code:
    private void Docking_PreviewWindowClose(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        var window = e.Source as ToolWindow; 
        if (window != null
        { 
            var container = window.Content as RadSplitContainer; 
            e.Handled = container != null && container.EnumeratePanes().Any(p => !p.CanUserClose); 
        } 
    If you set this method as event handler of the PreviewWindowClose event. Note that this code will not run with the official version, but will be included in the internal build and in the next official release as well. Some bugs are fixed in this internal version, too.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  6. Adiel
    Adiel avatar
    60 posts
    Member since:
    Jun 2012

    Posted 30 Apr 2009 Link to this post

    Hi
    Thanks a lot.
    By the way this events seems to me importsant antway.
    Adiel
  7. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 01 May 2009 Link to this post

    Hi Adiel,

    The latest internal builds have been just uploaded to the site. You can log into your account and download the files.

    Regards,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Adiel
    Adiel avatar
    60 posts
    Member since:
    Jun 2012

    Posted 03 May 2009 Link to this post

    Hi
    Thaks a lot.
Back to Top
DevCraft banner