-
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 |
Beta Was this translation helpful? Give feedback.
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 |
Beta Was this translation helpful? Give feedback.
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
InteractiveDialog
as an example) they do this byDataContext="{Binding InteractiveDialog, Source={StaticResource Locator}}"
, butIntercativeDialog
is here is not view by itself, this is the property inViewModelLocator
, that looks like this:public InteractiveDialogViewModel InteractiveDialog => SimpleIoc.Default.GetInstance<InteractiveDialogVi…