Main Site Documentation

On Property changed event


#1

Does anyone have a good example of this?
I have searched without success.


#2

Are you talking about WPF???

This is only supported by classes that have the IPropertyNotifyChanged interface implemented… I’m not sure that the .NET MF framework goes that far, you can look at the source code to find out if you download the porting kit… It’s in ComponentModel, but the only thing I can find there is editor attributes.


#3

There is reference to it in the NEMF documentation but no sample.
I found one sample but got pulled away before I could book mark it.


#4

You could also just create your own event in the class and fire it whenever a property changes.


#5

That is where I need some guidence Thaks


#6

 #region Events
        public delegate void PropertyChangedEventHandler(string Property, object Value);
        public event PropertyChangedEventHandler PropertyChangedEvent = delegate { };
 #endregion

 #region Properties
        public int Width
        {
                get { return _width; }
                set
                {
                        if (_width != value)
                        {
                                _width = value;
                                PropertyChangedEvent("Width", value);
                        }
                }
        }
 #endregion



#7

Thanks I will give it a try.