WPF running .ToString() of viewmodel instead of showing the coresponding view
For the context, the app is implementing mvvm and i have: a viewmodel named CheckViewModel and a corresponding view, some base classes like BaseViewModel, ObservableObject,etc and navigation through a interface and a class that implements that interface
My problem rises when I run the app. I Expect to get the view for CheckViewModel, which have some UI elements there but instead i get on top left corner the .ToString() method from CheckViewModel.
In the App.xaml i also have a defined resource for that view
App.xaml:
2 Replies
Stack Overflow
datatemplate in app.xaml is not getting picked up without any styles?
I have a DataTemplate in app.xaml that binds a view to a viewmodel.
<Application.Resources>
<DataTemplate DataType="{x:Type vm:someviewmodeltype}">
<vw:somevwcontrol /&g...
Wow, I didn't expect that.
Now it works perfectly! Thanks!