New to Telerik UI for WPFStart a free 30-day trial

InvalidOperationException When Using RadDocking on Different UI Threads

Updated on Sep 15, 2025

Environment

Product Version2019.2.618
ProductRadDocking for WPF

Description

"InvalidOperationException: The calling thread cannot access this object because a different thread owns it" thrown when RadDocking pane is opened in a thread different than the main UI thread. The error appears when try to interact with a RadPane's header.

Solution

Define a custom Style targeting the PaneHeader control. Preferably, the Style should be defined in the Resources of the Window or UserControl that shows the RadDocking on the separate thread. The Style should re-define the mouse right-click input binding of the header.

XAML
	<Window.Resources>
		<!-- If you use NoXaml dlls set the following property on the Style object: BasedOn="{StaticResource PaneHeaderStyle}" -->
		<Style TargetType="telerik:PaneHeader">
			<Setter Property="telerik:InputBindingsManager.InputBindings">
				<Setter.Value>
					<InputBindingCollection>
						<MouseBinding Command="telerik:RadDockingCommands.PaneHeaderMenuOpen">
							<MouseBinding.Gesture>
								<MouseGesture MouseAction="RightClick" />
							</MouseBinding.Gesture>
						</MouseBinding>
					</InputBindingCollection>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support