Public Class SummClass Implements INotifyPropertyChanged Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged Private _Summ As Integer Public Property Summ As Integer Get Return _Summ End Get Set(value As Integer) _Summ = value RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(NameOf(Summ))) End Set End Property End Class
Public Class ReportClass Public Property Month As Integer Public Property Summary As New ObservableCollection(Of SummClass) End Class
Public Property MyReport As New ReportClass
Dim binding As New Binding() binding.Path = New PropertyPath(MyReport.Summary(i).Summ) binding.RelativeSource = New RelativeSource(RelativeSourceMode.FindAncestor, GetType(Window), 1) binding.Mode = BindingMode.TwoWay binding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged LabelSumMamooriat.SetBinding(Label.ContentProperty, binding)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)