Пример #1
0
        static VirtualConnectionPoint()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(VirtualConnectionPoint),
                                                     new FrameworkPropertyMetadata(typeof(VirtualConnectionPoint)));

            XProperty.OverrideMetadata(typeof(VirtualConnectionPoint),
                                       new PropertyMetadata(
                                           (o, a) => Canvas.SetLeft((UIElement)o, ((double)a.NewValue) - Constants.VirtualPointXOffset)));
            YProperty.OverrideMetadata(typeof(VirtualConnectionPoint),
                                       new PropertyMetadata(
                                           (o, a) => Canvas.SetTop((UIElement)o, ((double)a.NewValue) - Constants.VirtualPointYOffset)));
        }
Пример #2
0
 set => SetValue(YProperty, value);