Closing the RadPane with a Close button on Header

3 posts, 0 answers
  1. Aasiya
    Aasiya avatar
    5 posts
    Member since:
    Jan 2012

    Posted 02 Jan 2012 Link to this post


    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
    We are using RadControls for Silverlight Q2 2011.

    Here is my xaml code :

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

                                         <StackPanel >
                                               <TextBlock Text="{Binding Header}"  />
                                                <telerik:RadButton x:Name="CloseButton"  Command="{Binding CloseCommand}" />
                                      <!--  -->


    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?
  2. Aasiya
    Aasiya avatar
    5 posts
    Member since:
    Jan 2012

    Posted 08 Jan 2012 Link to this post


    Any update on this?
  3. DevCraft R3 2016 release webinar banner
  4. Aasiya
    Aasiya avatar
    5 posts
    Member since:
    Jan 2012

    Posted 16 Jan 2012 Link to this post

    I'm waiting for response.., can you please help?
Back to Top