PRISM+RadDock throws exception on Pinning a RadPaneGroup

3 posts, 0 answers
  1. sonnet
    sonnet avatar
    6 posts
    Member since:
    Aug 2011

    Posted 13 Jan 2012 Link to this post

    Hi,
      I am using PRISM's region manager to load the docking panes in my main Shell screen. Here is the code I have in the main window xaml.
             <Grid>
            <telerik:RadDocking AllowUnsafeMode="True" Grid.Row="1">
     
                <telerik:RadDocking.DocumentHost>
                    <!--<ItemsControl x:Name="CenterRadPanelGroup" prism:RegionManager.RegionName="Region_ShellCenter" Background="White"/>-->
                    <telerik:RadSplitContainer Name="CenterRadPanelGroup"    prism:RegionManager.RegionName="{x:Static UICommon:Constants.REGION_SHELL_CENTER}"/>
                </telerik:RadDocking.DocumentHost>
     
                <telerik:RadSplitContainer InitialPosition="DockedLeft" Name="LeftRadPanelGroup" prism:RegionManager.RegionName="{x:Static UICommon:Constants.REGION_SHELL_LEFT}" />
                <telerik:RadSplitContainer InitialPosition="DockedRight" Name="RightRadPanelGroup"   prism:RegionManager.RegionName="{x:Static UICommon:Constants.REGION_SHELL_RIGHT}"/>
                <telerik:RadSplitContainer InitialPosition="DockedBottom" Name="BottomRadPanelGroup" prism:RegionManager.RegionName="{x:Static UICommon:Constants.REGION_SHELL_BOTTOM}"/>
            </telerik:RadDocking>
        </Grid>
    



    And this is the usercontrol for RadSplitContainer docked Right in the shell.
    <telerik:RadPaneGroup x:Class="MyClass"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
                 xmlns:local="clr-namespace:Simulation.UI">
        <telerik:RadPane Header="1"/>
        <telerik:RadPane Header="2"/>
        <telerik:RadPane Header="3"/>
        <telerik:RadPane Header="4">
            <local:SimulationDataControl />
        </telerik:RadPane>
    </telerik:RadPaneGroup>










    The RadPaneGroup renders properly in the mainwindow.
    But when I try to pin it, it throws the following exception.


    Message :- Object reference not set to an instance of an object.

    Source :- Telerik.Windows.Controls.Docking
    StackTrace :-    at Telerik.Windows.Controls.RadDocking.GetState(ISplitItem item)
       at Telerik.Windows.Controls.RadDocking.OnRadPanePinChange(Object sender, PinChangeEventArgs args)

       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at Telerik.Windows.Controls.RadPane.OnPinChange(PinChangeEventArgs args)
       at Telerik.Windows.Controls.RadPane.ChangePin(Boolean isPinned)
       at Telerik.Windows.Controls.RadPane.OnIsPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.RadPane.set_IsPinned(Boolean value)
       at Telerik.Windows.Controls.Docking.PaneGroupBase.ExecuteCommand(RadPane pane, ICommand command, PaneGroupBase groupBase)
       at Telerik.Windows.Controls.Docking.PaneGroupBase.<>c__DisplayClass3.<OnPaneCommandInvoke>b__2()
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()

  2. George
    Admin
    George avatar
    1332 posts

    Posted 18 Jan 2012 Link to this post

    Hi, 


    The RadDocking control doesn't support PRISM out of the box. What I would suggest is using the RadPaneGroup as prism regions. You could find additional information about how to use the RadDocking control with prism here:


    Hope this helps.


    Greetings,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. sonnet
    sonnet avatar
    6 posts
    Member since:
    Aug 2011

    Posted 26 Jan 2012 Link to this post

    Thanks. Marking region at RadPaneGroup instead of RadSplitContainer solved the pinning problem.
Back to Top