I have a Label
in a statusbar in my view with which I show messages to the user. I want to show the message and change background color only for a few seconds, so that I wouldn't have to clear the label with extra lines of code.
I have a StatusText
and StatusColor
properties in the viewmodel, and the label content and color are bound to these, and are working fine.
My question is how do I time it in ViewModel?
Can I use a timer in the viewmodel method and in a way that doesn't freeze the UI while displaying the message?
I'm trying to adher to the MVVM framework, but I couldn't find any solutions on SO without using events. Is it possible in some simple fashion?