Пример #1
0
        private static void OnInputSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VertexManipulator instance = (VertexManipulator)d;

            UIElement oldInputSource = e.OldValue as UIElement;
            UIElement newInputSource = e.NewValue as UIElement;

            if (oldInputSource != null)
            {
                instance.UnregisterInputSource(oldInputSource);
            }

            if (newInputSource != null)
            {
                instance.RegisterInputSource();
            }
        }