Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Docking > Closing the RadPane with a Close button on Header

Not answered Closing the RadPane with a Close button on Header

Feed from this thread
  • Aasiya avatar

    Posted on Jan 2, 2012 (permalink)

    Hi,

    I'm working on Sliverlight 4 with Prism 4. We are using RadDocking with RadPaneGroup. I've used the 'PaneGroupExtensions' given in this link for MVVM pattern
    - http://www.telerik.com/community/forums/wpf/docking/caliburn-mvvm-raddocking.aspx
    We are using RadControls for Silverlight Q2 2011.

    Here is my xaml code :

    <telerik:RadDocking>
            <telerik:RadDocking.DocumentHost >
                        <telerik:RadSplitContainer>
                            <telerik:RadPaneGroup  Name="RadPaneGroupMain"  
                                                 local:PaneGroupExtensions.ItemsSource="{Binding InnerPanes}" 
                                                 local:PaneGroupExtensions.ItemTitleDisplayMemberPath="Header">

                              <local:PaneGroupExtensions.ItemHeaderTemplate>
                                     <DataTemplate>
                                         <StackPanel >
                                               <TextBlock Text="{Binding Header}"  />
                                                <telerik:RadButton x:Name="CloseButton"  Command="{Binding CloseCommand}" />
                                           </StackPanel>
                                        </DataTemplate>
                             </local:PaneGroupExtensions.ItemHeaderTemplate>
               
                             <local:PaneGroupExtensions.ItemContentTemplate>
                                      <!--  -->
                              </local:PaneGroupExtensions.ItemContentTemplate>

                        </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
       </telerik:RadDocking>

    Its working fine. But i'm facing a problem while closing the RadPane. As shown in xaml, I have a HeaderTemplate for RadPane with a textbox and close button. When user clicks on close button Pane should be removed and also i need to remove the corresponding model object from the collection "InnerPanes". So instead of using the "RadDockingCommands:Close" , I used our own command to remove the model object. In Command method, I'm removing the model object from the "InnerPanes" collection object in my viewmodel class, so automatically "PaneGroupExtensions" code is taking care of removing the RadPane from RadPaneGroup. Both model object and corresponding Pane are getting removed but an error is getting raised  - "Value does not fall within the expected range."

    Stacktrace of the error is :

    "   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
       at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
       at System.Windows.UIElement.TransformToVisual(UIElement visual)
       at Telerik.Windows.Controls.ApplicationHelper.TransformToScreenRoot(UIElement target)
       at Telerik.Windows.Controls.WindowHost.GetGlobalMousePosition(UIElement target, MouseEventArgs e)
       at Telerik.Windows.Controls.InternalWindow.DragBehavior.OnElementLostMouseCapture(Object sender, MouseEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)"

    Could you please help me to resolve this issue?

    Reply

  • Aasiya avatar

    Posted on Jan 8, 2012 (permalink)

    Hi,

    Any update on this?

    Reply

  • Aasiya avatar

    Posted on Jan 16, 2012 (permalink)

    Hi,
    I'm waiting for response.., can you please help?

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Docking > Closing the RadPane with a Close button on Header
Related resources for "Closing the RadPane with a Close button on Header"

Silverlight Docking Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]