Vibrant discussion about CSLA .NET and using the framework to build great business applications.
I have ViewModel<T> business class and I have added Property of another businessclass to Validate search parameter. I have bound IsEnabled property of search button with businessclass object.IsValid Property.
But it does not get reflated when all required fields are selected.
Any Idea how to reflect UI with businessobject IsValid property
Does IsValid is dependency property?
That is correct. None of the metastate properties of business objects are bindable in the current versions of CSLA.
You should use ViewModelBase to access bindable versions of these properties, as shown in the video series and ebook series.
Thanks for your replay.
I have created a dependency Property in ViewModel and added Event handler BrokenRulesCollection.CollectionChanged for businessbase object property. Then set dependency property in event by checking count of brokernRules and bind with IsEnable property of the search button
if (this.Criteria.BrokenRulesCollection != null && this.Criteria.BrokenRulesCollection.Count != 0)
this.CanSearch = false;
this.CanSearch = true;
Its works fine.!!! But is it proper way achieve above scenario?
You can look at the implementation of the various properties (like CanSave) in the ViewModelBase class in Csla.Xaml. There are some tricks to making these properties work correctly - and they don't need to be a DependencyProperty - just a bindable property that raises PropertyChanged.