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

Problems with radTransitionControl in threaded window

1 Answer 164 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Paw
Top achievements
Rank 1
Paw asked on 05 Jan 2011, 03:25 PM

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.

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 11 Jan 2011, 09:48 AM
Hi Paw,

 I cannot fully understand what your scenario is. As it sounds quite complicated, could you please open a support ticket and send us a sample project that reproduces the problem? This would help investigate what exactly goes wrong.

Regards,
Miroslav Nedyalkov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
TransitionControl
Asked by
Paw
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or