private AreaTag CreateAreaTag(ITagModel tagModel) { AreaTag tag = new AreaTag(); SetTagBasePropertyBinding(tag); SetLineTextTagBasePropertyBindings(tag); SetAreaTagPropertyBindings(tag); return(tag); }
private static void OnAreaPointsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { AreaTag areaTag = d as AreaTag; areaTag.UpdateTagLocationInScreen(); if (e.OldValue is ObservableCollection <Point> oldCollection) { oldCollection.CollectionChanged -= areaTag.AreaPointCollection_CollectionChanged; } if (e.NewValue is ObservableCollection <Point> newCollection) { newCollection.CollectionChanged += areaTag.AreaPointCollection_CollectionChanged; } }