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

Facing an odd Issue in the hello world example. #109

Open
Offline-R503B opened this issue May 26, 2021 · 2 comments
Open

Facing an odd Issue in the hello world example. #109

Offline-R503B opened this issue May 26, 2021 · 2 comments

Comments

@Offline-R503B
Copy link

Offline-R503B commented May 26, 2021

DefaultViewLocator: Failed to resolve view for view model type 'System.Object'.

ViewModelViewHost: The ViewModelViewHost could not find a valid view for the view model of type NodeNetwork.ViewModels.NodeViewModel and value NodeNetwork.ViewModels.NodeViewModel.

I am getting these when trying to run the Hello World.

We are currently using the NodeNetwork in docked window (Syncfusion control)

If I run the Hello world in a normal window (Not part of docking) It works again.

Any help would be appreciated ! :D

@Wouterdek
Copy link
Owner

The Splat view locator is used to find the view type that corresponds to a viewmodel type (e.g. NodeViewModel => NodeView). For some reason, it is trying to locate a view for System.Object, which is not a viewmodel type and therefore fails. This probably means there is a ViewModelViewHost or listview somewhere that contains an object with type 'System.Object'. Beyond that, it's hard to tell what's going on without more context.

@Offline-R503B
Copy link
Author

Offline-R503B commented May 26, 2021

The Splat view locator is used to find the view type that corresponds to a viewmodel type (e.g. NodeViewModel => NodeView). For some reason, it is trying to locate a view for System.Object, which is not a viewmodel type and therefore fails. This probably means there is a ViewModelViewHost or listview somewhere that contains an object with type 'System.Object'. Beyond that, it's hard to tell what's going on without more context.

For giving context

As for our default MVVM framework we use Catel MVVM
We used to have Avalon Docking (Dirksters lib) for docking.

We now obtained licenses for syncfusions controls and thus moved all docked windows to their library.

The interesting thing is that it used to work when we had avalondocks.
But now that we switched , it doesn't seem to want to do that anymore.

If you happen to have some spare time to investigate : https://github.com/WolvenKit/WolvenKit
Branch : dev

(sorry for the 2nd edit as I wrote a reply some1 merged the PR branch)

I personally think it might be of how the DockingManager / Adapter system of syncfusion works (they apply a sort of 'hack' to have it function in MVVM).

Thanks in advance !

Edit : Please do let me know / contact me if you do check it out , I might have to make a small edit so the tool will be visible without making a whole project ( I forgot not everyone has Cyberpunk 2077 installed haha )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants