Sunday, 15 August 2010

c# - ComboBox IsEnabled property not updating -


I am trying to disable the item in a combo box when multiple properties (or simultaneous) return false results . For the first time I click on the combo box, the gates of the properties are called and the correct position is displayed. Every time I click the combobox for the first time, the properties are not changed again, even after they have been changed (i.e. the item enabled / disabled state should be different).

Here my code for combo box items is IsEnabled property:

   & Lt; Binding source = "{static resource vm}" path = "isfull180 annularis" /> & Lt; / MultiBinding & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt; & Lt; /ComboBox.ItemContainerStyle>  

UPDATE:

to apply my thoughts model and combo box items Dekenmodelbes which INotifyPropertyChanged Applies.

  public class ViewModelReferenceAxisType: ViewModelBase {public class ReferenceAxisTypeItem: ViewModelBase {...}} public abstract class ViewModelBase: INotifyPropertyChanged, IDisposable {#region INotifyPropertyChanged Members /// & lt; Summary & gt; /// When a property on this object is a new value raised. /// & lt; / Summary & gt; Public Event Threaded ChangedEventHandler Property changed; /// & lt; Summary & gt; /// This event raises the incident by changing the property's property. /// & lt; / Summary & gt; /// & lt; Param name = "propertyName" & gt; There is a new value in that property. & Lt; / Param & gt; Protected virtual void OnPropertyChanged ([CallerMemberName] string propertyName = "") {this.VerifyPropertyName (propertyName); If (this.PropertyChanged! = Null) {var e = new property changing EventArgs (propertyName); this. Property changes (this, e); }} # Timeout / // INotifyPropertyChanged Members  


No comments:

Post a Comment