Async Commands (and Async Relay Command) - EASY WPF (.NET CORE)

preview_player
Показать описание
Learn how to setup async commands in WPF (or Xamarin). I create an AsyncCommandBase to take care of async specific command requirements so that derived classes simply need to implement their command logic. I also demonstrate various ways to handle exceptions and implement an async RelayCommand.

Рекомендации по теме
Комментарии
Автор

Now I clearly understood the async relay commmand. Thanks.

shahjahan
Автор

Man you got everything I ask for :) Keep up the good work man

GrowlAndTwinkle
Автор

Great content and explanations @SingleonSean, these are great content to show young developers I have.

Bugaluggit
Автор

your videos are the best around man! keep going!

Can you make an hour with the basics and best practices for a begginer at wpf? i would be interested in that

FuzzyDPozzy
Автор

Great content, it's helping me a lot during my internship thank you so much, and i was hoping you could do some videos on prism because it's not well covered, again thank you

hayderdif
Автор

Hi Sean, is it a common practice to use the ViewModel in a command to acces the properties of the ViewModel?

ganganu
Автор

Hi Sean, I recently discovered your channel and I am thrilled I can still find active desktop developers here. I am planning to watch all your WPF series from the beginning but I have a queestion for you: can you create a video for exception handling in .NET/WPF? Where we should handle the exceptions if we also have class libraries or different layers on our app? At the class library level and inform the user via an event, or we should log the exception and re-throw it?

mihaimyh
Автор

Hi sean, every video that you make are all great and informative! and I am learning a lot. If you don't mind, can you show us also how you would handle a Datagrid with controls like ComboBox in it that's binded to an observablecollection property, I have an idea how to do it but somehow it's having performance issues in the speed of display and how will you handle large records aside from paging. Thanks

CharwinAmper
Автор

Keep it up your good work and explanation. U deserved more views and subscribers. Thanks mate

diontan
Автор

Hi Sean what about properties that use multiple place ?
How to set it and use it anywhere

vandeljasonstrypper
Автор

Thank you, once again, for a great content. I do have a question about the RelayCommand case, specifically regarding the lambda exception action in the constructor of LoginViewModel. Since the callback is in the view model, is it possible to handle exceptions within the callback and set the StatusMessage there, or are there going to be issues with scoping or race conditions?

abd.alharbi
Автор

Hah, SingletonSean. I've been on one of your videos before, but only now with some increase knowledge I appreciate the pun.

For this video (although it being 3 years old), I don't think using async void is good in any case. Multiple sources say so, and when I did implement it I landed in the exact situation they warned me for. If you want to fire the task and forget it, make it a void and handle the task appropriate.

jannickbreunis
Автор

Hey sean us it possible to have an async CanExecute method?

GrowlAndTwinkle
Автор

As always, you're the best. Thank you for sharing your knowledge with us. I have one question though. What if I want to pass a parameter in the callback? Can you please do a video on that? Thanks!

omostan
Автор

what about cancelling a long running command. cancellationtokens don't really have a reset.. so if you call cts.cancel for example.. if you user fixes the input then presses the go button again the cancellation token still says cancelled.
thanks for any feedback or ideas

netflix_and_zwift
Автор

Great tutorials as always thanks brother. Do you think making CanExecute method virtual to later on override for extra checks is a good idea or is there a better way around it that you can suggest ?

delysid
Автор

Awesome you gave me the answer to stop spamming button

rahulmathew
Автор

hello thanks for the great tut
i tried the same step as you have done with a progress bar but the UI didn't updated
can you tell me why ?

anaibrahim
Автор

great video, as usual . Do you have video where you added CancellactionToken

WahidRezgui
Автор

Hi Sean, nice videos, good job; Could you please make a video to display data in popup window using mvvm?

kuldeepbora
welcome to shbcf.ru