Esempio n. 1
0
        /// <summary>
        /// Invokes the PositionChanged event
        /// </summary>
        protected override void InvokePositionChanged()
        {
            base.InvokePositionChanged();

            if (Junction != null && Junction.Parent != null)
            {
                Junction.InvalidateGeometry();
            }

            #region update debugging label
#if showlabels
            if (Parent != null && Parent is Canvas)
            {
                if (l == null)
                {
                    l = new SnappableLabel {
                        FontSize = 8
                    };
                    XCaseCanvas.Children.Add(l);
                    Canvas.SetLeft(l, this.CanvasPosition.X - 20);
                    Canvas.SetTop(l, this.CanvasPosition.Y + 10);
                    this.SnapElementToThumb(l);

                    l.Visibility = Visibility.Visible;
                }
                l.Content = this.ToString();
            }
#endif
            #endregion

            InvalidateVisual();
        }