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

System.ArgumentNullException in RxApp static constructor #29

Closed
ondrejpialek opened this issue Aug 5, 2011 · 1 comment
Closed

System.ArgumentNullException in RxApp static constructor #29

ondrejpialek opened this issue Aug 5, 2011 · 1 comment
Labels

Comments

@ondrejpialek
Copy link

Hi, when you try to create a ReactiveCommand before you have a RootVisual assigned in SL, RxApp will throw an exception because it is checking InUnitTestRunner() passing in Application.Current.RootVisual which it expects been set.

To reproduce simply create a new SL project, have a ViewLocator as a static resource to which you bind from the view. When instantiating the view, the model gets instantiated first and since the view wasn't set to the RootVisual before the model was instantiated it will be null.

Workaround: in Application_Startup set RootVisual to new Grid() and then set to the main view.

@anaisbetts
Copy link
Member

I believe this should be fixed in master. Please reopen this if it's still broken

@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