Beispiel #1
0
        public ConnectInfo GetInfo()
        {
            parent = Parent as ControlAdorner;
            var element = parent.AdornedElement as HMIControlBase;

            return(element.GetInfo1(this.Orientation, this.RelativePosition));
        }
Beispiel #2
0
        }                                                 //在OnRenderSizeChanged函数中创建

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);
            if (DesignerProperties.GetIsInDesignMode(this))
            {
                AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this);
                if (adornerLayer != null)
                {
                    if (LinkableAdorner == null)
                    {
                        LinkableAdorner            = new ControlAdorner(this);
                        LinkableAdorner.Visibility = Visibility.Hidden;
                    }
                }
            }
        }