Exemplo n.º 1
0
 public DesignerItemAdorner(ContentControl designerItem)
     : base(designerItem)
 {
     SnapsToDevicePixels = true;
     this.visuals        = new VisualCollection(this);
     if (designerItem.Content is Line)
     {
         this._lineChrome        = new LineChrome();
         _lineChrome.DataContext = designerItem;
     }
     else
     {
         designerItem.RenderTransform   = new RotateTransform(0);
         this._sizeChrome               = new ResizeableChrome();
         this._sizeChrome.DataContext   = designerItem;
         this._rotateChrome             = new RotateableChrome();
         this._rotateChrome.DataContext = designerItem;
         // this._originChrome = new TransformOriginPointChrome();
         //this._originChrome.DataContext = designerItem;
         //this.visuals.Add(this._sizeChrome);
         //this.visuals.Add(this._rotateChrome);
     }
     InitChromeList();
     AddToChromeList();
 }
Exemplo n.º 2
0
        public LineAdorner(ContentControl designerItem)
            : base(designerItem)
        {
            SnapsToDevicePixels = true;

            this._chrome             = new LineChrome();
            this._chrome.DataContext = designerItem;
            this._visuals            = new VisualCollection(this);
            this._visuals.Add(this._chrome);
        }