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

RadDocumentPane Q1 2009 CanUserClose

6 Answers 127 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Rogério
Top achievements
Rank 1
Rogério asked on 12 Mar 2009, 06:22 PM
Hello,

I've just installed the new RadControls Q1 2009 and tried to use RadDocking!
In my application I have several RadPane's and a DocumentHost to show RadDocumentPane's.

                <radDock:RadDocking.DocumentHost>

                    <radDock:RadSplitContainer>
                        <radDock:RadPaneGroup x:Name="PagesWindowGroup">
                            <radDock:RadDocumentPane Title="Description" Content="Some content" CanUserClose="True" />                            
                        </radDock:RadPaneGroup>
                    </radDock:RadSplitContainer>

                </radDock:RadDocking.DocumentHost>

My problem is that I cannot see how can I close the RadDocumentPane! I've created my prototype based on Telekit sample!

Can you tell  me what am I doing wrong?

Thanks.

6 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 13 Mar 2009, 08:33 AM
Hello Rogério,

There is no dropdown menu for panes in DocumentHost. You have two options: hold Control key and left click over the header to show the context menu or drag pane to ToolWindow (just start dragging the pane) and the you can close it from the pane header or from ToolWindow.

Thanks for the feedback.
We will improve this behavior. All features or suggestions are highly appreciated.

Kind regards,
Hristo
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
Rogério
Top achievements
Rank 1
answered on 13 Mar 2009, 09:19 AM
Hi Hristo,

Thanks for your quick answer! Your suggestion are good workarounds for now!

There's another problem that I've just faced! If I open a lot of RadDocumentPane's, the headers are resized! It would be better to have some kind of "navigation" popup to select the DocumentPane that we want (something like Visual Studio 2005/2008).

Regards,
Rogério

0
Hristo
Telerik team
answered on 13 Mar 2009, 09:27 AM
Hi Rogério,

This is a feature that we will try to include in the next service pack (although I'm not sure we will make it).
Thanks.

Best wishes,
Hristo
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
James
Top achievements
Rank 1
answered on 13 Aug 2009, 10:10 AM
Hello,

I've just come across this same problem: is it possible to close a RadDocumentPane while it is docked, without bringing up the context menu?

Ideally what I want is to be able to trigger a close operation on the RadDocumentPane from a close button (e.g. a "cross" icon), like how you close a tab in Internet Explorer etc.

Thanks,

James.
0
Miroslav Nedyalkov
Telerik team
answered on 13 Aug 2009, 01:51 PM
Hi James,

What you need to do is to change the HeaderTemplate of the Pane you like to have a close button. Here is an example:
<docking:RadPane Header="Pane"
    <docking:RadPane.HeaderTemplate> 
        <DataTemplate> 
            <StackPanel Orientation="Horizontal"
                <Image Source="Icon.jpg" Width="16" Height="16" /> 
                <TextBlock Text="{Binding}" /> 
                <Button Content="X" Click="Button_Click" /> 
            </StackPanel> 
        </DataTemplate> 
    </docking:RadPane.HeaderTemplate> 
</docking:RadPane> 
And the code-behind:
private void Button_Click(object sender, RoutedEventArgs e) 
    var pane = (sender as FrameworkElement).ParentOfType<RadPane>(); 
    pane.IsHidden = true

The code-behind is not implemented in the best way, but it demonstrates the main idea.

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
James
Top achievements
Rank 1
answered on 15 Aug 2009, 01:09 AM
Thanks Miroslav,

Ideally I don't want to have to implement code to close the pane, which would mean I'd have to isolate the header template from my external resource dictionary file.

I have submitted a feature request (ticket ID : 235365)

Cheers,

James.
Tags
Docking
Asked by
Rogério
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Rogério
Top achievements
Rank 1
James
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or