* UIFlowLayoutPanel: 增加了几个原生方法

This commit is contained in:
Sunny 2021-08-08 11:06:57 +08:00
parent 1b85ff03ff
commit 76e13855df
6 changed files with 35 additions and 15 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -24,6 +24,7 @@ using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Windows.Forms.Layout;
namespace Sunny.UI
{
@ -64,6 +65,40 @@ namespace Sunny.UI
timer.Stop();
}
public override LayoutEngine LayoutEngine
{
get { return Panel.LayoutEngine; }
}
[DefaultValue(System.Windows.Forms.FlowDirection.LeftToRight)]
[Localizable(true)]
public FlowDirection FlowDirection
{
get => Panel.FlowDirection;
set => Panel.FlowDirection = value;
}
[DefaultValue(true)]
[Localizable(true)]
public bool WrapContents
{
get => Panel.WrapContents;
set => Panel.WrapContents = value;
}
[DefaultValue(false)]
[DisplayName("FlowBreak")]
public bool GetFlowBreak(Control control)
{
return Panel.GetFlowBreak(control);
}
[DisplayName("FlowBreak")]
public void SetFlowBreak(Control control, bool value)
{
Panel.SetFlowBreak(control, value);
}
protected override void OnControlAdded(ControlEventArgs e)
{
if (e.Control is UIHorScrollBarEx bar1)
@ -183,21 +218,7 @@ namespace Sunny.UI
{
}
[DefaultValue(FlowDirection.LeftToRight)]
[Localizable(true)]
public FlowDirection FlowDirection
{
get => Panel.FlowDirection;
set => Panel.FlowDirection = value;
}
[DefaultValue(true)]
[Localizable(true)]
public bool WrapContents
{
get => Panel.WrapContents;
set => Panel.WrapContents = value;
}
public override void SetStyleColor(UIBaseStyle uiColor)
{
@ -331,7 +352,6 @@ namespace Sunny.UI
SetScrollPos();
}
public FlowLayoutPanel Panel => flowLayoutPanel;
private void InitializeComponent()