Hello
How can I open a separate window from ViewModel?
Thanks for opening this issue. Please use and fill out the issue template as it gives us a better overview of what is going on. If you haven't already added reproduction steps or even better a repository with a reproduction sample, please do so. It speeds up debugging issues a lot.
Thanks for opening this issue. Please use and fill out the issue template as it gives us a better overview of what is going on. If you haven't already added reproduction steps or even better a repository with a reproduction sample, please do so. It speeds up debugging issues a lot.
But that was a question not an issue.
Sure, but how do you expect me to answer anything if you don't provide any information? We have issue templates for questions too.
Sure, but how do you expect me to answer anything if you don't provide any information? We have issue templates for questions too.
I want to open a separate window from ViewModel after pressing the button.
I have tried a navigationService but it shows the window in the current view.
Which platform?
What have you tried?
Did you get any error? If so what is the error?
If it crashed what is the stack trace?
Which platform?
What have you tried?
Did you get any error? If so what is the error?
If it crashed what is the stack trace?
Platform is WPF.
I have tried await _navigationService.Navigate<UserViewModel>();
I didn't get any error.
Nothing was crashed.
All the time I just want to ask, HOW to open a separate window from ViewModel. Because it's MVVM therefore I cant create new instance of view and use showDialog() method. And I'm asking how to do it in MVVM Cross.
All the time I was asking about details 馃槃 Had you just provided them to begin with everything would have been fine. But if I have to start digging it is simply not worth my time.
If you use the [MvxWindowPresentationAttribute] you should be able to open a specific ViewModel as a Window. See https://github.com/MvvmCross/MvvmCross/blob/develop/MvvmCross/Platforms/Wpf/Presenters/Attributes/MvxWindowPresentationAttribute.cs
And from ViewModel:
https://github.com/MvvmCross/MvvmCross/blob/87a545a2f59eafd2179fdde29fcebef68f171656/Projects/Playground/Playground.Core/ViewModels/MainViewModel.cs#L38
GitHub
The .NET MVVM framework for cross-platform solutions, including Xamarin.iOS, Xamarin.Android, Windows and Mac. - MvvmCross/MvvmCross
GitHub
The .NET MVVM framework for cross-platform solutions, including Xamarin.iOS, Xamarin.Android, Windows and Mac. - MvvmCross/MvvmCross
Thank you very much it's working great!