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

Loading Panel Contents

2 Answers 64 Views
Docking
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 13 Sep 2012, 01:14 PM
Hi,

I'm looking at using the Docking control in my application, I have used the RadDock in a WinForms app and was wondering if this works in a similar way? 

What I want to have is a RibbonBar where different views/windows can be loaded into the the RadDocking. is it possible to load views/windows this way or how should this be done.

thanks 

David.

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 2
answered on 13 Sep 2012, 03:15 PM
ok got a bit further

I have set my RadDock up as follows

<telerik:RadDocking Grid.Row="1">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup
                ItemsSource="{Binding Views}"
                ItemTemplate="{StaticResource TabItemTemplate}">
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

This loads all the panes i need based on a collection of objects but if i try to drag an item i get a {"Object reference not set to an instance of an object."}

at Telerik.Windows.Controls.RadDocking.GetElementPositionAtScreenRoot(FrameworkElement element) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 1473
at Telerik.Windows.Controls.RadDocking.OnDockingElementDragged(Point globalPosition, Object draggedElement) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 613
at Telerik.Windows.Controls.RadDocking.OnDockingElementDragged(Object sender, DragInfoEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 969
at Telerik.Windows.Controls.Docking.DragInfoEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\EventArgs\DragInfoEventArgs.cs:line 48
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.RouteItem.InvokeHandler(RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.EventRoute.InvokeHandlers(Object source, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at Telerik.Windows.Controls.Docking.DraggableItemHelper.OnDragDelta(Point globalMousePosition, Rect initialRect, Rect destinationRect, Boolean isResize) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\DragDrop\DraggableItemHelper.cs:line 30
at Telerik.Windows.Controls.InternalWindow.DragBehavior.OnElementMouseMove(Object sender, MouseEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\DragBehavior.cs:line 151
at System.Windows.Input.MouseEventArgs.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.RouteItem.InvokeHandler(RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.EventRoute.InvokeHandlers(Object source, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
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.TranslateAndDispatchMessage(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()
at Views.App.Main() in c:\Users\David\Documents\Visual Studio 2012\Projects\ACEGP\Views\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


Thanks David
0
Ivo
Telerik team
answered on 18 Sep 2012, 11:52 AM
Hi David,

Using the ItemsSource property of the RadPaneGroup is not supported. There is such property and it is bindable because it is inhereted from the ItemsControl class. The RadPanes should be defined in xaml as demonstrated in this help article.
In order to show and hide different panes using a RadRibbonBar you can use tha RadPane's IsHidden property.

Greetings,
Ivo
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
Docking
Asked by
David
Top achievements
Rank 2
Answers by
David
Top achievements
Rank 2
Ivo
Telerik team
Share this question
or