Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: evaluating action guards in caliburn micro

$
0
0
mvermef wrote:
how about a single void method containing those instead of recreating the wheel in each method you need the notifications to fire?

like UpdateToolBar()?

private void UpdateToolBar(){
//send out notifications... etc..
NotifyOfPropertyChange(() => CanFirst);
NotifyOfPropertyChange(() => CanLast);
NotifyOfPropertyChange(() => CanPrevious);
NotifyOfPropertyChange(() => CanNext);
NotifyOfPropertyChange(() => CanNew);
NotifyOfPropertyChange(() => CanUpdate);
NotifyOfPropertyChange(() => CanDelete);
NotifyOfPropertyChange(() => CanSave);
NotifyOfPropertyChange(() => CanActive);
}
Unfortunately they are not in same view model and every action have a dozen of different notify property changed. they can't grouped in a function
We have three hundred view model, we can't manually update them!

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>