Repository navigation
|
I cant find any proper example for using dialogs. The one in docs is incomplete. It doesnt explain how provided viewmodel should look like and it works somw DialogResult variable that is not defined anywhere. Can somebody explain to me how to properly await on dialog result? I am using Interactions from ReactiveUI and my current code looks like this |
Replies: 1 comment 1 reply
|
I don't know, is question still actual, but I got the same error, tried to Google and found only this. Simple answer: just set DataContext in your dialog view ( Details: In the demo (I get |



I don't know, is question still actual, but I got the same error, tried to Google and found only this.
After that, I started researching the source code of the demo.
Simple answer: just set DataContext in your dialog view (
UserControl)DataContext = YourViewModel(VM should inheritIDialogResultable/IDialogResultable<T>)Details: In the demo (I get
InteractiveDialogas an example) they do this byDataContext="{Binding InteractiveDialog, Source={StaticResource Locator}}", butIntercativeDialogis here is not view by itself, this is the property inViewModelLocator, that looks like this:public InteractiveDialogViewModel InteractiveDialog => SimpleIoc.Default.GetInstance<InteractiveDialogVi…