Hi
In my application each thread is implemented in its own thread like:
public void OpenPartViewer(AbstractPart part) { Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint)); newWindowThread.SetApartmentState(ApartmentState.STA); newWindowThread.IsBackground = true; newWindowThread.Start(); part_ = part; } private void ThreadStartingPoint() { // Create a new window PartViewerMainWindow win = new PartViewerMainWindow(part_); win.Closed += (sender1, e1) => win.Dispatcher.InvokeShutdown(); win.Show(); // Start the new window's Dispatcher System.Windows.Threading.Dispatcher.Run(); }In one of the dialogs I previously used a ContentControl which I now want to replace with a RadTransitionControl like the above.
<telerik:RadTransitionControl x:Name="PartViewerContent" Grid.Column="1" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Content="{Binding ElementName=TreeView, Path=SelectedItem}" ContentTemplateSelector="{StaticResource PartViewerContentSelector}"> </telerik:RadTransitionControl>But after changing to RadTransitionControl I get an error when I change selection in the treeview:
The calling thread cannot access this object because a different thread owns it
I asume it is raised because the transitions is rendered in the main thead but I don't know. And more important. Can I do some magic to make it work.