コード例 #1
0
 private void RemoveAdorner()
 {
     if (_connectionAdorner != null)
     {
         var canvas = OwnerCanvas;
         if (canvas != null)
         {
             var adornerLayer = AdornerLayer.GetAdornerLayer(canvas);
             if (adornerLayer != null)
             {
                 adornerLayer.Remove(_connectionAdorner);
                 _connectionAdorner = null;
             }
         }
     }
 }
コード例 #2
0
        private void ShowAdorner()
        {
            // the ConnectionAdorner is created once for each Connection
            if (_connectionAdorner == null)
            {
                var designer = VisualTreeHelper.GetParent(this) as DesignerCanvas;

                var adornerLayer = AdornerLayer.GetAdornerLayer(designer);
                if (adornerLayer != null)
                {
                    _connectionAdorner = new ConnectionAdorner(designer, this);
                    adornerLayer.Add(_connectionAdorner);
                }
            }
            _connectionAdorner.Visibility = Visibility.Visible;
        }
コード例 #3
0
ファイル: Connection.cs プロジェクト: 569550384/Rafy
        private void ShowAdorner()
        {
            // the ConnectionAdorner is created once for each Connection
            if (_connectionAdorner == null)
            {
                var designer = VisualTreeHelper.GetParent(this) as DesignerCanvas;

                var adornerLayer = AdornerLayer.GetAdornerLayer(designer);
                if (adornerLayer != null)
                {
                    _connectionAdorner = new ConnectionAdorner(designer, this);
                    adornerLayer.Add(_connectionAdorner);
                }
            }
            _connectionAdorner.Visibility = Visibility.Visible;
        }
コード例 #4
0
ファイル: Connection.cs プロジェクト: 569550384/Rafy
 private void RemoveAdorner()
 {
     if (_connectionAdorner != null)
     {
         var canvas = OwnerCanvas;
         if (canvas != null)
         {
             var adornerLayer = AdornerLayer.GetAdornerLayer(canvas);
             if (adornerLayer != null)
             {
                 adornerLayer.Remove(_connectionAdorner);
                 _connectionAdorner = null;
             }
         }
     }
 }