private void CaptionBinding(AnnotationLabel annotationLabel) { var binding = new Binding(nameof(Caption)) { Source = this, Mode = BindingMode.TwoWay }; annotationLabel.SetBinding(AnnotationLabel.TextProperty, binding); }
protected override void OnAnnotationLoaded(object sender, RoutedEventArgs e) { var annotationLabel = new AnnotationLabel { LabelPlacement = LabelPlacement.Top, CanEditText = true }; CaptionBinding(annotationLabel); AnnotationLabels.Add(annotationLabel); X1 = null; Y1Binding(); pd.AddValueChanged(this, OnValueChanged); base.OnAnnotationLoaded(sender, e); }