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

CanUserClose on Docking backdoor

6 Answers 116 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Adiel
Top achievements
Rank 2
Adiel asked on 28 Apr 2009, 09:36 AM
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

6 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 28 Apr 2009, 11:27 AM
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.
0
Adiel
Top achievements
Rank 2
answered on 28 Apr 2009, 11:39 AM
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
0
Miroslav Nedyalkov
Telerik team
answered on 30 Apr 2009, 12:47 PM
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.
0
Adiel
Top achievements
Rank 2
answered on 30 Apr 2009, 01:08 PM
Hi
Thanks a lot.
By the way this events seems to me importsant antway.
Adiel
0
Nikolay
Telerik team
answered on 01 May 2009, 01:30 PM
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.
0
Adiel
Top achievements
Rank 2
answered on 03 May 2009, 06:56 AM
Hi
Thaks a lot.
Tags
Docking
Asked by
Adiel
Top achievements
Rank 2
Answers by
Miroslav Nedyalkov
Telerik team
Adiel
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or