protected override void OnLayout(LayoutEventArgs e) { if (ParentToolStrip != null && ParentToolStrip.IsInDesignMode) { if (FlowLayout.GetFlowDirection(this) != FlowDirection.TopDown) { FlowLayout.SetFlowDirection(this, FlowDirection.TopDown); } if (FlowLayout.GetWrapContents(this)) { FlowLayout.SetWrapContents(this, false); } } else { if (FlowLayout.GetFlowDirection(this) != FlowDirection.LeftToRight) { FlowLayout.SetFlowDirection(this, FlowDirection.LeftToRight); } if (!FlowLayout.GetWrapContents(this)) { FlowLayout.SetWrapContents(this, true); } } base.OnLayout(e); }
protected override void OnLayout(LayoutEventArgs e) { if (ParentToolStrip is not null && ParentToolStrip.IsInDesignMode) { if (FlowLayout.GetFlowDirection(this) != FlowDirection.TopDown) { FlowLayout.SetFlowDirection(this, FlowDirection.TopDown); } if (FlowLayout.GetWrapContents(this)) { FlowLayout.SetWrapContents(this, false); } }