Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cross-thread access in RoutedViewHost #339

Closed
PhilPJL opened this issue Jul 6, 2013 · 2 comments
Closed

Invalid cross-thread access in RoutedViewHost #339

PhilPJL opened this issue Jul 6, 2013 · 2 comments
Labels

Comments

@PhilPJL
Copy link

PhilPJL commented Jul 6, 2013

I've installed 5.02 from NuGet.

Adding

    <Grid>
        <xaml:RoutedViewHost/>
    </Grid>

Results in 'Invalid cross-thread access' in the designer.

@anaisbetts
Copy link
Member

Call stack? Platform?

@PhilPJL
Copy link
Author

PhilPJL commented Jul 6, 2013

Sorry, not a good bug report :(
Visual Studio 2012 or 2013.
Windows 8 x64
WPF .NET 4.5 app.
exception
designer

Create a blank app.
Add ReactiveUI 5.02 via NuGet.
Add above lines to MainWindow.
Invalid cross-thread access reported.

I've added screenshots of the designer and the exception details.

I've worked around the problem by creating the RoutedViewHost in code

public partial class MainWindow
{
    #region Constructors and Destructors

    public MainWindow()
    {
        this.InitializeComponent();

        var viewHost = new RoutedViewHost();
        this.Grid.Children.Add(viewHost);
        viewHost.Router = RxApp.DependencyResolver.GetService<IScreen>().Router;
    }

    #endregion
}

}

anaisbetts pushed a commit that referenced this issue Jul 11, 2013
Fix for #339 - Move WPF check before Silverlight.
@lock lock bot added the outdated label Jun 26, 2019
@lock lock bot locked and limited conversation to collaborators Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants