Ejemplo n.º 1
0
 protected virtual void OnInkCanvasChildrenChanged(InkCanvasChildrenChangedEventArgs e)
 {
     if (InkCanvasChildrenChanged != null)
     {
         InkCanvasChildrenChanged(this, e);
     }
 }
Ejemplo n.º 2
0
        void InkCanvasDelete(object sender, ExecutedRoutedEventArgs e)
        {
            ReadOnlyCollection <UIElement> selectedElements = GetSelectedElements();
            List <UIElement> removedElements = new List <UIElement>();

            for (int i = selectedElements.Count - 1; i >= 0; i--)
            {
                if (selectedElements[i] != bkg)
                {
                    removedElements.Add(selectedElements[i]);
                    Children.Remove(selectedElements[i]);
                }
            }

            InkCanvasChildrenChangedEventArgs args = new InkCanvasChildrenChangedEventArgs {
                Removed = new ReadOnlyCollection <UIElement>(removedElements),
                Added   = new ReadOnlyCollection <UIElement>(new UIElement[] { })
            };

            OnInkCanvasChildrenChanged(args);
            OnSelectionChanged(new EventArgs());
        }
Ejemplo n.º 3
0
		void InkCanvasDelete(object sender, ExecutedRoutedEventArgs e) {
			ReadOnlyCollection<UIElement> selectedElements = GetSelectedElements();
			List<UIElement> removedElements = new List<UIElement>();

			for (int i = selectedElements.Count - 1; i >= 0; i--)
				if (selectedElements[i] != bkg) {
					removedElements.Add(selectedElements[i]);
					Children.Remove(selectedElements[i]);
				}

			InkCanvasChildrenChangedEventArgs args = new InkCanvasChildrenChangedEventArgs {
				Removed = new ReadOnlyCollection<UIElement>(removedElements),
				Added = new ReadOnlyCollection<UIElement>(new UIElement[] { })
			};
			OnInkCanvasChildrenChanged(args);
			OnSelectionChanged(new EventArgs());
		}
Ejemplo n.º 4
0
		protected virtual void OnInkCanvasChildrenChanged(InkCanvasChildrenChangedEventArgs e) {
			if (InkCanvasChildrenChanged != null)
				InkCanvasChildrenChanged(this, e);
		}