Hi aherlambang, You need to wrap it into a class in order to use DataBinding. That class should implement INotifyPropertyChanged interface. Here is the example. public class MyInteger : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private int intValue; public int IntValue { get { return intValue; } set { intValue = value; PropertyChanged(this, new PropertyChangedEventArgs("IntValue")); } } public MyInteger() { PropertyChanged = new PropertyChangedEventHandler(OnPropertyChanged); intValue = 0; } protected void OnPropertyChanged(object send, PropertyChangedEventArgs e) { } } To use this class in DataBinding. MyInteger myInt = new MyInteger(); myInt.IntValue = 1; trackBar1.DataBindings.Add("Value", myInt, "IntValue"); Sincerely, Kira Qian Please mark the replies as answers if they help and unmark if they don't.- Marked As Answer byKira QianMSFT, ModeratorMonday, July 27, 2009 6:29 AM
-
|