private void Label_OnRemoveSelf(object sender, EventArgs e)
 {
     OnRemoveLabel?.Invoke(this, new PolicyChangeEventArgs()
     {
         State = this,
         Label = (FeatureValuePair)sender
     });
 }
Пример #2
0
        private void B_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
            Debug.WriteLine("Manipulation finish");
            _draging = false;
            ObservableCollection <LabelItem> itemsSource = ItemsSource as ObservableCollection <LabelItem>;
            var toRemove = (sender as Button).GetValue(LabelProperty) as LabelItem;

            itemsSource.Remove(toRemove);
            update();
            OnRemoveLabel?.Execute(new LabelListChangeEvent {
                label            = toRemove,
                LabelListControl = this,
                eventType        = LabelListChangeEvent.EventType.Remove
            });
        }