Ejemplo n.º 1
0
 protected override void CreateChildElements()
 {
     this.fill       = new FillPrimitive();
     this.fill.Class = "GripFill";
     this.Children.Add((RadElement)this.fill);
     this.border              = new BorderPrimitive();
     this.border.Class        = "GripBorder";
     this.border.AutoSizeMode = RadAutoSizeMode.FitToAvailableSize;
     this.Children.Add((RadElement)this.border);
     this.gripItem = new SizeGripItem();
     this.gripItem.StretchHorizontally = false;
     this.gripItem.StretchVertically   = false;
     this.gripItem.Class        = "GripNS";
     this.gripItem.Image.Class  = "GripNSImage";
     this.gripItem.SizingMode   = SizeGripItem.SizingModes.Vertical;
     this.gripItem.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
     this.gripItem.Alignment    = System.Drawing.ContentAlignment.BottomCenter;
     this.Children.Add((RadElement)this.gripItem);
     this.gripItem2 = new SizeGripItem();
     this.gripItem2.StretchHorizontally = false;
     this.gripItem2.StretchVertically   = false;
     this.gripItem2.Class        = "GripNSEW";
     this.gripItem2.Image.Class  = "GripNSEWImage";
     this.gripItem2.SizingMode   = SizeGripItem.SizingModes.Both;
     this.gripItem2.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
     this.gripItem2.RightToLeft  = this.RightToLeft;
     this.gripItem2.Alignment    = System.Drawing.ContentAlignment.MiddleRight;
     this.Children.Add((RadElement)this.gripItem2);
 }
Ejemplo n.º 2
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     base.OnMouseUp(e);
     this.ElementTree.Control.Cursor = Cursors.Arrow;
     this.Capture = false;
     if (!this.allowSizing || SizeGripItem.activeGrip != this)
     {
         return;
     }
     SizeGripItem.activeGrip = (SizeGripItem)null;
 }
Ejemplo n.º 3
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     if (!this.allowSizing)
     {
         return;
     }
     this.mouseDown = Control.MousePosition;
     this.OnSizing((object)this, new ValueChangingEventArgs((object)this.mouseDown));
     this.oldMousePos        = this.mouseDown;
     this.downPos            = this.ElementTree.Control.PointToScreen(Point.Empty);
     this.downSize           = this.ElementTree.Control.Size;
     this.downRect           = new Rectangle(this.downPos, this.downSize);
     this.Capture            = true;
     SizeGripItem.activeGrip = this;
 }