RadDocumentPane Q1 2009 CanUserClose

7 posts, 0 answers
  1. Rogério
    Rogério avatar
    33 posts
    Member since:
    Feb 2009

    Posted 12 Mar 2009 Link to this post

    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.

  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 13 Mar 2009 Link to this post

    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.
  3. Rogério
    Rogério avatar
    33 posts
    Member since:
    Feb 2009

    Posted 13 Mar 2009 Link to this post

    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

  4. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 13 Mar 2009 Link to this post

    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.
  5. James
    James avatar
    136 posts
    Member since:
    Nov 2008

    Posted 13 Aug 2009 Link to this post

    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.
  6. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 13 Aug 2009 Link to this post

    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.
  7. James
    James avatar
    136 posts
    Member since:
    Nov 2008

    Posted 14 Aug 2009 Link to this post

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