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

Flyout Tasks Never Complete #5

Closed
KuroThing opened this issue Mar 18, 2017 · 4 comments
Closed

Flyout Tasks Never Complete #5

KuroThing opened this issue Mar 18, 2017 · 4 comments

Comments

@KuroThing
Copy link

When using an AsyncRelayCommand and the FlyoutManager, the task is never completed, so the command's CanExecute check always returns false.

@thoemmi
Copy link
Owner

thoemmi commented Mar 19, 2017

I cannot reproduce this issue. The ViewModel of Flyouts must derive from DialogViewModel, and if you call DialogViewModel.Close(), the flyout's task will complete. Please have a look at the demo application.

@KuroThing
Copy link
Author

That is kind of the problem, afaik there is no mechanism in place so that when a flyout is closed by the default button, that the close method is called? So the Task is never set to be completed?

@thoemmi
Copy link
Owner

thoemmi commented Mar 20, 2017

Are you talking about the "arrow" button in the header? If your view is derived from Flyout, you can bind your view's CloseCommand to a command provided by your viewmodel, which in turn can call DialogViewModel.Close().

If your view is not derived from Flyout but a general UserControl, than you're right, the task will never complete. Unfortunately, I didn't pay attention to that scenario yet.

@KuroThing
Copy link
Author

Ahh i see, i was missing the CloseCommand binding part of it, i didn't realise the Flyout provided a way to do that using the default arrow button.

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