protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); CalcScrolling(); // Crappy fix to certain scrolling issue //if (sbVert != null) sbVert.Value -= 1; //if (sbHorz != null) sbHorz.Value -= 1; }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); if (Value + PageSize > Range) { Value = Range - PageSize; } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); if (clientArea != null) { clientArea.Left = ClientLeft; clientArea.Top = ClientTop; clientArea.Width = ClientWidth; clientArea.Height = ClientHeight; } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); if (btnDown != null) { btnDown.Width = 16; btnDown.Height = Height - Skin.Layers[0].ContentMargins.Vertical; btnDown.Top = Skin.Layers[0].ContentMargins.Top; btnDown.Left = Width - btnDown.Width - 2; } }
protected override void OnResize(ResizeEventArgs e) { SetMovableArea(); base.OnResize(e); }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); }
protected override void OnResize(ResizeEventArgs e) { CalcScrolling(); base.OnResize(e); }
private void Bars_Resize(object sender, ResizeEventArgs e) { AdjustMargins(); }
protected virtual void OnValidateResize(ResizeEventArgs e) { if (ValidateResize != null) ValidateResize.Invoke(this, e); }
protected override void OnResize(ResizeEventArgs e) { CalcLayout(); base.OnResize(e); }
private void PerformResize(MouseEventArgs e) { if (resizable && !IsMoving) { if (!IsResizing) { #if (!XBOX && !XBOX_FAKE) GetResizePosition(e); Manager.Cursor = Cursor = GetResizeCursor(); #endif } if (IsResizing) { invalidated = true; bool top = false; bool bottom = false; bool left = false; bool right = false; if ((resizeArea == EAlignment.TopCenter || resizeArea == EAlignment.TopLeft || resizeArea == EAlignment.TopRight) && (resizeEdge & EAnchors.Top) == EAnchors.Top) top = true; else if ((resizeArea == EAlignment.BottomCenter || resizeArea == EAlignment.BottomLeft || resizeArea == EAlignment.BottomRight) && (resizeEdge & EAnchors.Bottom) == EAnchors.Bottom) bottom = true; if ((resizeArea == EAlignment.MiddleLeft || resizeArea == EAlignment.BottomLeft || resizeArea == EAlignment.TopLeft) && (resizeEdge & EAnchors.Left) == EAnchors.Left) left = true; else if ((resizeArea == EAlignment.MiddleRight || resizeArea == EAlignment.BottomRight || resizeArea == EAlignment.TopRight) && (resizeEdge & EAnchors.Right) == EAnchors.Right) right = true; int w = Width; int h = Height; int l = Left; int t = Top; if (outlineResizing && !OutlineRect.IsEmpty) { l = OutlineRect.Left; t = OutlineRect.Top; w = OutlineRect.Width; h = OutlineRect.Height; } int px = e.Position.X - (parent != null ? parent.AbsoluteLeft : 0); int py = e.Position.Y - (parent != null ? parent.AbsoluteTop : 0); if (left) { w = w + (l - px) + leftModifier + pressDiff[0]; l = px - leftModifier - pressDiff[0] - CheckWidth(ref w); } else if (right) { w = px - l - leftModifier + pressDiff[2]; CheckWidth(ref w); } if (top) { h = h + (t - py) + topModifier + pressDiff[1]; t = py - topModifier - pressDiff[1] - CheckHeight(ref h); } else if (bottom) { h = py - t - topModifier + pressDiff[3]; CheckHeight(ref h); } if (!Suspended) { ResizeEventArgs v = new ResizeEventArgs(w, h, Width, Height); OnValidateResize(v); if (top) { // Compensate for a possible height change from Validate event t += (h - v.Height); } if (left) { // Compensate for a possible width change from Validate event l += (w - v.Width); } w = v.Width; h = v.Height; } if (outlineResizing) { OutlineRect = new Rectangle(l, t, w, h); if (parent != null) parent.Invalidate(); } else { Width = w; Height = h; Top = t; Left = l; } } } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); selection.Clear(); SetupBars(); }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); if (Value + PageSize > Range) Value = Range - PageSize; }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); ItemsChanged(); }
private void ProcessAnchor(ResizeEventArgs e) { if (((Anchor & EAnchors.Right) == EAnchors.Right) && ((Anchor & EAnchors.Left) != EAnchors.Left)) { Left = Parent.VirtualWidth - Width - anchorMargins.Right; } else if (((Anchor & EAnchors.Right) == EAnchors.Right) && ((Anchor & EAnchors.Left) == EAnchors.Left)) { Width = Parent.VirtualWidth - Left - anchorMargins.Right; } else if (((Anchor & EAnchors.Right) != EAnchors.Right) && ((Anchor & EAnchors.Left) != EAnchors.Left)) { int diff = (e.Width - e.OldWidth); if (e.Width % 2 != 0 && diff != 0) { diff += (diff / Math.Abs(diff)); } Left += (diff / 2); } if (((Anchor & EAnchors.Bottom) == EAnchors.Bottom) && ((Anchor & EAnchors.Top) != EAnchors.Top)) { Top = Parent.VirtualHeight - Height - anchorMargins.Bottom; } else if (((Anchor & EAnchors.Bottom) == EAnchors.Bottom) && ((Anchor & EAnchors.Top) == EAnchors.Top)) { Height = Parent.VirtualHeight - Top - anchorMargins.Bottom; } else if (((Anchor & EAnchors.Bottom) != EAnchors.Bottom) && ((Anchor & EAnchors.Top) != EAnchors.Top)) { int diff = (e.Height - e.OldHeight); if (e.Height % 2 != 0 && diff != 0) { diff += (diff / Math.Abs(diff)); } Top += (diff / 2); } }
protected override void OnResize(ResizeEventArgs e) { base.OnResize(e); RecalcParams(); }
protected virtual void OnResize(ResizeEventArgs e) { Invalidate(); if (Resize != null) Resize.Invoke(this, e); }
protected virtual void OnParentResize(object sender, ResizeEventArgs e) { ProcessAnchor(e); }