更新DropDown

This commit is contained in:
czz_y 2024-08-21 15:38:36 +08:00
parent c26075010f
commit 9348312b55
15 changed files with 1085 additions and 167 deletions

View File

@ -37,52 +37,20 @@ namespace AntdUIDemo.Controls
}
private void Input_offset_ValueChanged(object sender, decimal value)
{
AppSetting.UpdateAppSetting("ShowOffset", input_offset.Value.ToString());
AntdUI.Config.NoticeWindowOffsetXY = (int)value;
}
private void switch_showinwindow_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ShowInWindow", value ? "True" : "False");
AntdUI.Config.ShowInWindow = value;
AntdUI.Message.success(Window,"切换成功!",autoClose: 1);
AntdUI.Notification.success(Window, "提示","切换成功!", autoClose: 3);
}
private void switch_scrollbar_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ScrollBarHide", value ? "True" : "False");
AntdUI.Config.ScrollBarHide = value;
}
private void switch_shadow_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ShadowEnabled", value ? "True" : "False");
AntdUI.Config.ShadowEnabled = value;
}
private void InitData()
{
tabs.SelectedIndex = 0;
//色彩模式
var colormode = ConfigurationManager.AppSettings["ColorMode"];
switch (colormode)
{
case "Dark":
select_colormode.SelectedIndex = 2;
break;
case "Light":
select_colormode.SelectedIndex = 1;
break;
case "Auto":
select_colormode.SelectedIndex = 0;
break;
default:
select_colormode.SelectedIndex = 0;
break;
}
var modeIndexMapping = new Dictionary<string, int>
{
{ "Dark", 2 },
{ "Light", 1 },
{ "Auto", 0 }
};
select_colormode.SelectedIndex = modeIndexMapping.ContainsKey(colormode)
? modeIndexMapping[colormode]
: 0;
//开启动画
var animation = ConfigurationManager.AppSettings["Animation"];
switch_animation.Checked = animation == "True";
@ -100,6 +68,7 @@ namespace AntdUIDemo.Controls
input_offset.Value = decimal.Parse(offset);
}
#region
private void Select_colormode_SelectedIndexChanged(object sender, int value)
{
AppSetting.UpdateAppSetting("ColorMode", select_colormode.SelectedValue.ToString());
@ -118,5 +87,34 @@ namespace AntdUIDemo.Controls
AppSetting.UpdateAppSetting("Animation", switch_animation.Checked.ToString());
AntdUI.Config.Animation = value;
}
private void Input_offset_ValueChanged(object sender, decimal value)
{
AppSetting.UpdateAppSetting("ShowOffset", input_offset.Value.ToString());
AntdUI.Config.NoticeWindowOffsetXY = (int)value;
}
private void switch_showinwindow_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ShowInWindow", value ? "True" : "False");
AntdUI.Config.ShowInWindow = value;
AntdUI.Message.success(Window, "切换成功!", autoClose: 1);
AntdUI.Notification.success(Window, "提示", "切换成功!", autoClose: 1);
}
private void switch_scrollbar_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ScrollBarHide", value ? "True" : "False");
AntdUI.Config.ScrollBarHide = value;
}
private void switch_shadow_CheckedChanged(object sender, bool value)
{
AppSetting.UpdateAppSetting("ShadowEnabled", value ? "True" : "False");
AntdUI.Config.ShadowEnabled = value;
}
#endregion
}
}

View File

@ -158,6 +158,9 @@ namespace AntdUIDemo
case "StackPanel":
control = new StackPanelDemo();
break;
case "Dropdown":
control = new DropDownDemo();
break;
}
if (control != null)
{

View File

@ -26,7 +26,7 @@ namespace AntdUIDemo.Models
},
{ "导航", new List<MenuItems>
{
new MenuItems { Text = "DropDown 下拉菜单", Tag = "DropDown"},
new MenuItems { Text = "Dropdown 下拉菜单", Tag = "Dropdown"},
new MenuItems { Text = "Menu 导航菜单", Tag = "Menu"},
new MenuItems { Text = "Pagination 分页", Tag = "Pagination"},
new MenuItems { Text = "Steps 步骤条", Tag = "Steps"}

View File

@ -40,7 +40,7 @@
![StackPanel](assets/screenshots/StackPanel.png)
### 导航
#### DropDown 下拉菜单
#### Dropdown 下拉菜单
#### Menu 导航菜单
#### Pagination 分页
#### Steps 步骤条

View File

@ -136,7 +136,7 @@
//
this.button39.BackExtend = "135, #6253E1, #04BEFE";
this.button39.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button39.ImageSvg = resources.GetString("button39.ImageSvg");
this.button39.IconSvg = resources.GetString("button39.IconSvg");
this.button39.Location = new System.Drawing.Point(3, 3);
this.button39.Name = "button39";
this.button39.Size = new System.Drawing.Size(156, 32);
@ -194,7 +194,7 @@
this.button37.BorderWidth = 2F;
this.button37.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button37.Ghost = true;
this.button37.ImageSvg = resources.GetString("button37.ImageSvg");
this.button37.IconSvg = resources.GetString("button37.IconSvg");
this.button37.JoinRight = true;
this.button37.Location = new System.Drawing.Point(3, 3);
this.button37.Name = "button37";
@ -231,7 +231,7 @@
// button34
//
this.button34.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button34.ImageSvg = resources.GetString("button34.ImageSvg");
this.button34.IconSvg = resources.GetString("button34.IconSvg");
this.button34.JoinLeft = true;
this.button34.JoinRight = true;
this.button34.Location = new System.Drawing.Point(77, 3);
@ -280,11 +280,11 @@
this.button28.BorderWidth = 2F;
this.button28.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button28.Ghost = true;
this.button28.ImageSvg = resources.GetString("button28.ImageSvg");
this.button28.Location = new System.Drawing.Point(327, 3);
this.button28.IconSvg = resources.GetString("button28.IconSvg");
this.button28.Location = new System.Drawing.Point(347, 3);
this.button28.Name = "button28";
this.button28.ShowArrow = true;
this.button28.Size = new System.Drawing.Size(75, 32);
this.button28.Size = new System.Drawing.Size(80, 32);
this.button28.TabIndex = 11;
this.button28.Text = "搜索";
this.button28.Type = AntdUI.TTypeMini.Primary;
@ -294,11 +294,11 @@
//
this.button27.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button27.Ghost = true;
this.button27.ImageSvg = resources.GetString("button27.ImageSvg");
this.button27.Location = new System.Drawing.Point(246, 3);
this.button27.IconSvg = resources.GetString("button27.IconSvg");
this.button27.Location = new System.Drawing.Point(261, 3);
this.button27.Name = "button27";
this.button27.ShowArrow = true;
this.button27.Size = new System.Drawing.Size(75, 32);
this.button27.Size = new System.Drawing.Size(80, 32);
this.button27.TabIndex = 10;
this.button27.Text = "搜索";
this.button27.Type = AntdUI.TTypeMini.Primary;
@ -309,10 +309,10 @@
this.button26.BorderWidth = 2F;
this.button26.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button26.Ghost = true;
this.button26.Location = new System.Drawing.Point(165, 3);
this.button26.Location = new System.Drawing.Point(175, 3);
this.button26.Name = "button26";
this.button26.ShowArrow = true;
this.button26.Size = new System.Drawing.Size(75, 32);
this.button26.Size = new System.Drawing.Size(80, 32);
this.button26.TabIndex = 9;
this.button26.Text = "Primary";
this.button26.Type = AntdUI.TTypeMini.Primary;
@ -322,10 +322,10 @@
//
this.button25.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button25.Ghost = true;
this.button25.Location = new System.Drawing.Point(84, 3);
this.button25.Location = new System.Drawing.Point(89, 3);
this.button25.Name = "button25";
this.button25.ShowArrow = true;
this.button25.Size = new System.Drawing.Size(75, 32);
this.button25.Size = new System.Drawing.Size(80, 32);
this.button25.TabIndex = 8;
this.button25.Text = "Primary";
this.button25.Type = AntdUI.TTypeMini.Primary;
@ -337,7 +337,7 @@
this.button29.Location = new System.Drawing.Point(3, 3);
this.button29.Name = "button29";
this.button29.ShowArrow = true;
this.button29.Size = new System.Drawing.Size(75, 32);
this.button29.Size = new System.Drawing.Size(80, 32);
this.button29.TabIndex = 7;
this.button29.Text = "Primary";
this.button29.Type = AntdUI.TTypeMini.Primary;
@ -371,7 +371,7 @@
this.button21.BorderWidth = 2F;
this.button21.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button21.Ghost = true;
this.button21.ImageSvg = resources.GetString("button21.ImageSvg");
this.button21.IconSvg = resources.GetString("button21.IconSvg");
this.button21.Location = new System.Drawing.Point(279, 3);
this.button21.Name = "button21";
this.button21.Size = new System.Drawing.Size(75, 32);
@ -385,7 +385,7 @@
this.button22.BorderWidth = 2F;
this.button22.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button22.Ghost = true;
this.button22.ImageSvg = resources.GetString("button22.ImageSvg");
this.button22.IconSvg = resources.GetString("button22.IconSvg");
this.button22.Location = new System.Drawing.Point(241, 3);
this.button22.Name = "button22";
this.button22.Shape = AntdUI.TShape.Circle;
@ -398,7 +398,7 @@
//
this.button19.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button19.Ghost = true;
this.button19.ImageSvg = resources.GetString("button19.ImageSvg");
this.button19.IconSvg = resources.GetString("button19.IconSvg");
this.button19.Location = new System.Drawing.Point(160, 3);
this.button19.Name = "button19";
this.button19.RightToLeft = System.Windows.Forms.RightToLeft.No;
@ -412,7 +412,7 @@
//
this.button20.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button20.Ghost = true;
this.button20.ImageSvg = resources.GetString("button20.ImageSvg");
this.button20.IconSvg = resources.GetString("button20.IconSvg");
this.button20.Location = new System.Drawing.Point(122, 3);
this.button20.Name = "button20";
this.button20.Shape = AntdUI.TShape.Circle;
@ -424,7 +424,7 @@
// button23
//
this.button23.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button23.ImageSvg = resources.GetString("button23.ImageSvg");
this.button23.IconSvg = resources.GetString("button23.IconSvg");
this.button23.Location = new System.Drawing.Point(41, 3);
this.button23.Name = "button23";
this.button23.Size = new System.Drawing.Size(75, 32);
@ -435,7 +435,7 @@
// button24
//
this.button24.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button24.ImageSvg = resources.GetString("button24.ImageSvg");
this.button24.IconSvg = resources.GetString("button24.IconSvg");
this.button24.Location = new System.Drawing.Point(3, 3);
this.button24.Name = "button24";
this.button24.Shape = AntdUI.TShape.Circle;

View File

@ -117,37 +117,37 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="button39.ImageSvg" xml:space="preserve">
<data name="button39.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896"&gt;&lt;path d="M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button37.ImageSvg" xml:space="preserve">
<data name="button37.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button34.ImageSvg" xml:space="preserve">
<data name="button34.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button28.ImageSvg" xml:space="preserve">
<data name="button28.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button27.ImageSvg" xml:space="preserve">
<data name="button27.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button21.ImageSvg" xml:space="preserve">
<data name="button21.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button22.ImageSvg" xml:space="preserve">
<data name="button22.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button19.ImageSvg" xml:space="preserve">
<data name="button19.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button20.ImageSvg" xml:space="preserve">
<data name="button20.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button23.ImageSvg" xml:space="preserve">
<data name="button23.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button24.ImageSvg" xml:space="preserve">
<data name="button24.IconSvg" xml:space="preserve">
<value>&lt;svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"&gt;&lt;path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
</root>

699
Views/DropDownDemo.Designer.cs generated Normal file
View File

@ -0,0 +1,699 @@
namespace AntdUIDemo.Views
{
partial class DropDownDemo
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new AntdUI.Label();
this.label2 = new AntdUI.Label();
this.label3 = new AntdUI.Label();
this.label4 = new AntdUI.Label();
this.label5 = new AntdUI.Label();
this.stackPanel1 = new AntdUI.StackPanel();
this.flowPanel6 = new AntdUI.FlowPanel();
this.dropdown33 = new AntdUI.Dropdown();
this.dropdown32 = new AntdUI.Dropdown();
this.dropdown31 = new AntdUI.Dropdown();
this.dropdown30 = new AntdUI.Dropdown();
this.dropdown28 = new AntdUI.Dropdown();
this.dropdown34 = new AntdUI.Dropdown();
this.label8 = new AntdUI.Label();
this.flowPanel5 = new AntdUI.FlowPanel();
this.dropdown26 = new AntdUI.Dropdown();
this.dropdown25 = new AntdUI.Dropdown();
this.label7 = new AntdUI.Label();
this.divider1 = new AntdUI.Divider();
this.label6 = new AntdUI.Label();
this.flowPanel1 = new AntdUI.FlowPanel();
this.dropdown1 = new AntdUI.Dropdown();
this.dropdown2 = new AntdUI.Dropdown();
this.dropdown3 = new AntdUI.Dropdown();
this.label9 = new AntdUI.Label();
this.flowPanel2 = new AntdUI.FlowPanel();
this.dropdown4 = new AntdUI.Dropdown();
this.dropdown5 = new AntdUI.Dropdown();
this.dropdown6 = new AntdUI.Dropdown();
this.label10 = new AntdUI.Label();
this.flowPanel3 = new AntdUI.FlowPanel();
this.dropdown_multi = new AntdUI.Dropdown();
this.label11 = new AntdUI.Label();
this.flowPanel4 = new AntdUI.FlowPanel();
this.dropdown_icon = new AntdUI.Dropdown();
this.label12 = new AntdUI.Label();
this.flowPanel7 = new AntdUI.FlowPanel();
this.dropdown_online = new AntdUI.Dropdown();
this.dropdown_enable = new AntdUI.Dropdown();
this.dropdown_custom = new AntdUI.Dropdown();
this.stackPanel1.SuspendLayout();
this.flowPanel6.SuspendLayout();
this.flowPanel5.SuspendLayout();
this.flowPanel1.SuspendLayout();
this.flowPanel2.SuspendLayout();
this.flowPanel3.SuspendLayout();
this.flowPanel4.SuspendLayout();
this.flowPanel7.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(3, 3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 1;
this.label1.Text = "Dropdown 下拉菜单";
//
// label2
//
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(3, 49);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 2;
this.label2.Text = "向下弹出的列表。";
//
// label3
//
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.label3.Location = new System.Drawing.Point(3, 79);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(694, 39);
this.label3.TabIndex = 18;
this.label3.Text = "当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。";
//
// label4
//
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.label4.Location = new System.Drawing.Point(3, 124);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(694, 24);
this.label4.TabIndex = 24;
this.label4.Text = "○ 用于收罗一组命令操作";
//
// label5
//
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.label5.Location = new System.Drawing.Point(3, 154);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(694, 24);
this.label5.TabIndex = 30;
this.label5.Text = "○ Select 用于选择,而 Dropdown 是命令集合";
//
// stackPanel1
//
this.stackPanel1.Controls.Add(this.flowPanel7);
this.stackPanel1.Controls.Add(this.label12);
this.stackPanel1.Controls.Add(this.flowPanel4);
this.stackPanel1.Controls.Add(this.label11);
this.stackPanel1.Controls.Add(this.flowPanel3);
this.stackPanel1.Controls.Add(this.label10);
this.stackPanel1.Controls.Add(this.flowPanel2);
this.stackPanel1.Controls.Add(this.label9);
this.stackPanel1.Controls.Add(this.flowPanel1);
this.stackPanel1.Controls.Add(this.label6);
this.stackPanel1.Controls.Add(this.flowPanel6);
this.stackPanel1.Controls.Add(this.label8);
this.stackPanel1.Controls.Add(this.flowPanel5);
this.stackPanel1.Controls.Add(this.label7);
this.stackPanel1.Controls.Add(this.divider1);
this.stackPanel1.Controls.Add(this.label5);
this.stackPanel1.Controls.Add(this.label4);
this.stackPanel1.Controls.Add(this.label3);
this.stackPanel1.Controls.Add(this.label2);
this.stackPanel1.Controls.Add(this.label1);
this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.stackPanel1.Location = new System.Drawing.Point(0, 0);
this.stackPanel1.Name = "stackPanel1";
this.stackPanel1.Size = new System.Drawing.Size(700, 806);
this.stackPanel1.TabIndex = 0;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
//
// flowPanel6
//
this.flowPanel6.Controls.Add(this.dropdown33);
this.flowPanel6.Controls.Add(this.dropdown32);
this.flowPanel6.Controls.Add(this.dropdown31);
this.flowPanel6.Controls.Add(this.dropdown30);
this.flowPanel6.Controls.Add(this.dropdown28);
this.flowPanel6.Controls.Add(this.dropdown34);
this.flowPanel6.Location = new System.Drawing.Point(3, 306);
this.flowPanel6.Name = "flowPanel6";
this.flowPanel6.Size = new System.Drawing.Size(694, 38);
this.flowPanel6.TabIndex = 35;
this.flowPanel6.Text = "flowPanel6";
//
// dropdown33
//
this.dropdown33.BorderWidth = 2F;
this.dropdown33.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown33.Ghost = true;
this.dropdown33.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown33.Location = new System.Drawing.Point(458, 3);
this.dropdown33.Name = "dropdown33";
this.dropdown33.Placement = AntdUI.TAlignFrom.TR;
this.dropdown33.Size = new System.Drawing.Size(85, 32);
this.dropdown33.TabIndex = 7;
this.dropdown33.Text = "TopRight";
this.dropdown33.Trigger = AntdUI.Trigger.Hover;
this.dropdown33.Type = AntdUI.TTypeMini.Primary;
this.dropdown33.WaveSize = 0;
//
// dropdown32
//
this.dropdown32.BorderWidth = 2F;
this.dropdown32.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown32.Ghost = true;
this.dropdown32.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown32.Location = new System.Drawing.Point(367, 3);
this.dropdown32.Name = "dropdown32";
this.dropdown32.Placement = AntdUI.TAlignFrom.Top;
this.dropdown32.Size = new System.Drawing.Size(85, 32);
this.dropdown32.TabIndex = 6;
this.dropdown32.Text = "Top";
this.dropdown32.Trigger = AntdUI.Trigger.Hover;
this.dropdown32.Type = AntdUI.TTypeMini.Primary;
this.dropdown32.WaveSize = 0;
//
// dropdown31
//
this.dropdown31.BorderWidth = 2F;
this.dropdown31.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown31.Ghost = true;
this.dropdown31.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown31.Location = new System.Drawing.Point(276, 3);
this.dropdown31.Name = "dropdown31";
this.dropdown31.Placement = AntdUI.TAlignFrom.TL;
this.dropdown31.Size = new System.Drawing.Size(85, 32);
this.dropdown31.TabIndex = 5;
this.dropdown31.Text = "TopLeft";
this.dropdown31.Trigger = AntdUI.Trigger.Hover;
this.dropdown31.Type = AntdUI.TTypeMini.Primary;
this.dropdown31.WaveSize = 0;
//
// dropdown30
//
this.dropdown30.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown30.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown30.Location = new System.Drawing.Point(185, 3);
this.dropdown30.Name = "dropdown30";
this.dropdown30.Placement = AntdUI.TAlignFrom.BR;
this.dropdown30.Size = new System.Drawing.Size(85, 32);
this.dropdown30.TabIndex = 4;
this.dropdown30.Text = "BottomRight";
this.dropdown30.Trigger = AntdUI.Trigger.Hover;
this.dropdown30.Type = AntdUI.TTypeMini.Primary;
this.dropdown30.WaveSize = 0;
//
// dropdown28
//
this.dropdown28.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown28.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown28.Location = new System.Drawing.Point(94, 3);
this.dropdown28.Name = "dropdown28";
this.dropdown28.Placement = AntdUI.TAlignFrom.Bottom;
this.dropdown28.Size = new System.Drawing.Size(85, 32);
this.dropdown28.TabIndex = 3;
this.dropdown28.Text = "Bottom";
this.dropdown28.Trigger = AntdUI.Trigger.Hover;
this.dropdown28.Type = AntdUI.TTypeMini.Primary;
this.dropdown28.WaveSize = 0;
//
// dropdown34
//
this.dropdown34.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown34.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown34.Location = new System.Drawing.Point(3, 3);
this.dropdown34.Name = "dropdown34";
this.dropdown34.Size = new System.Drawing.Size(85, 32);
this.dropdown34.TabIndex = 2;
this.dropdown34.Text = "BottomLeft";
this.dropdown34.Trigger = AntdUI.Trigger.Hover;
this.dropdown34.Type = AntdUI.TTypeMini.Primary;
this.dropdown34.WaveSize = 0;
//
// label8
//
this.label8.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(3, 276);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(694, 24);
this.label8.TabIndex = 34;
this.label8.Text = "弹出位置";
//
// flowPanel5
//
this.flowPanel5.Controls.Add(this.dropdown26);
this.flowPanel5.Controls.Add(this.dropdown25);
this.flowPanel5.Location = new System.Drawing.Point(3, 232);
this.flowPanel5.Name = "flowPanel5";
this.flowPanel5.Size = new System.Drawing.Size(694, 38);
this.flowPanel5.TabIndex = 33;
this.flowPanel5.Text = "flowPanel5";
//
// dropdown26
//
this.dropdown26.BorderWidth = 2F;
this.dropdown26.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown26.Ghost = true;
this.dropdown26.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown26.Location = new System.Drawing.Point(94, 3);
this.dropdown26.Name = "dropdown26";
this.dropdown26.Size = new System.Drawing.Size(85, 32);
this.dropdown26.TabIndex = 3;
this.dropdown26.Text = "Hover";
this.dropdown26.Trigger = AntdUI.Trigger.Hover;
this.dropdown26.Type = AntdUI.TTypeMini.Primary;
this.dropdown26.WaveSize = 0;
//
// dropdown25
//
this.dropdown25.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown25.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown25.Location = new System.Drawing.Point(3, 3);
this.dropdown25.Name = "dropdown25";
this.dropdown25.Size = new System.Drawing.Size(85, 32);
this.dropdown25.TabIndex = 2;
this.dropdown25.Text = "Click";
this.dropdown25.Type = AntdUI.TTypeMini.Primary;
this.dropdown25.WaveSize = 0;
//
// label7
//
this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(3, 202);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(694, 24);
this.label7.TabIndex = 32;
this.label7.Text = "触发类型";
//
// divider1
//
this.divider1.Location = new System.Drawing.Point(3, 184);
this.divider1.Name = "divider1";
this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 31;
//
// label6
//
this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(3, 350);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(694, 24);
this.label6.TabIndex = 36;
this.label6.Text = "显示箭头";
//
// flowPanel1
//
this.flowPanel1.Controls.Add(this.dropdown3);
this.flowPanel1.Controls.Add(this.dropdown1);
this.flowPanel1.Controls.Add(this.dropdown2);
this.flowPanel1.Location = new System.Drawing.Point(3, 380);
this.flowPanel1.Name = "flowPanel1";
this.flowPanel1.Size = new System.Drawing.Size(694, 38);
this.flowPanel1.TabIndex = 37;
this.flowPanel1.Text = "flowPanel1";
//
// dropdown1
//
this.dropdown1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown1.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown1.Location = new System.Drawing.Point(94, 3);
this.dropdown1.Name = "dropdown1";
this.dropdown1.ShowArrow = true;
this.dropdown1.Size = new System.Drawing.Size(85, 32);
this.dropdown1.TabIndex = 3;
this.dropdown1.Text = "Arrow";
this.dropdown1.Trigger = AntdUI.Trigger.Hover;
this.dropdown1.Type = AntdUI.TTypeMini.Primary;
this.dropdown1.WaveSize = 0;
//
// dropdown2
//
this.dropdown2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown2.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown2.Location = new System.Drawing.Point(3, 3);
this.dropdown2.Name = "dropdown2";
this.dropdown2.Size = new System.Drawing.Size(85, 32);
this.dropdown2.TabIndex = 2;
this.dropdown2.Text = "无";
this.dropdown2.Trigger = AntdUI.Trigger.Hover;
this.dropdown2.Type = AntdUI.TTypeMini.Primary;
this.dropdown2.WaveSize = 0;
//
// dropdown3
//
this.dropdown3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown3.IsLink = true;
this.dropdown3.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown3.Location = new System.Drawing.Point(185, 3);
this.dropdown3.Name = "dropdown3";
this.dropdown3.ShowArrow = true;
this.dropdown3.Size = new System.Drawing.Size(85, 32);
this.dropdown3.TabIndex = 4;
this.dropdown3.Text = "link Arrow";
this.dropdown3.Trigger = AntdUI.Trigger.Hover;
this.dropdown3.Type = AntdUI.TTypeMini.Primary;
this.dropdown3.WaveSize = 0;
//
// label9
//
this.label9.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(3, 424);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(694, 24);
this.label9.TabIndex = 38;
this.label9.Text = "显示数量";
//
// flowPanel2
//
this.flowPanel2.Controls.Add(this.dropdown4);
this.flowPanel2.Controls.Add(this.dropdown5);
this.flowPanel2.Controls.Add(this.dropdown6);
this.flowPanel2.Location = new System.Drawing.Point(3, 454);
this.flowPanel2.Name = "flowPanel2";
this.flowPanel2.Size = new System.Drawing.Size(694, 38);
this.flowPanel2.TabIndex = 39;
this.flowPanel2.Text = "flowPanel2";
//
// dropdown4
//
this.dropdown4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown4.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown4.Location = new System.Drawing.Point(185, 3);
this.dropdown4.MaxCount = 5;
this.dropdown4.Name = "dropdown4";
this.dropdown4.ShowArrow = true;
this.dropdown4.Size = new System.Drawing.Size(85, 32);
this.dropdown4.TabIndex = 4;
this.dropdown4.Text = "5";
this.dropdown4.Trigger = AntdUI.Trigger.Hover;
this.dropdown4.Type = AntdUI.TTypeMini.Primary;
this.dropdown4.WaveSize = 0;
//
// dropdown5
//
this.dropdown5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown5.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown5.Location = new System.Drawing.Point(94, 3);
this.dropdown5.Name = "dropdown5";
this.dropdown5.ShowArrow = true;
this.dropdown5.Size = new System.Drawing.Size(85, 32);
this.dropdown5.TabIndex = 3;
this.dropdown5.Text = "4";
this.dropdown5.Trigger = AntdUI.Trigger.Hover;
this.dropdown5.Type = AntdUI.TTypeMini.Primary;
this.dropdown5.WaveSize = 0;
//
// dropdown6
//
this.dropdown6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown6.Items.AddRange(new object[] {
"first menu item",
"second menu item",
"third menu item",
"fourth menu item",
"fifth menu item"});
this.dropdown6.Location = new System.Drawing.Point(3, 3);
this.dropdown6.MaxCount = 3;
this.dropdown6.Name = "dropdown6";
this.dropdown6.ShowArrow = true;
this.dropdown6.Size = new System.Drawing.Size(85, 32);
this.dropdown6.TabIndex = 2;
this.dropdown6.Text = "3";
this.dropdown6.Trigger = AntdUI.Trigger.Hover;
this.dropdown6.Type = AntdUI.TTypeMini.Primary;
this.dropdown6.WaveSize = 0;
//
// label10
//
this.label10.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(3, 498);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(694, 24);
this.label10.TabIndex = 40;
this.label10.Text = "多级菜单";
//
// flowPanel3
//
this.flowPanel3.Controls.Add(this.dropdown_multi);
this.flowPanel3.Location = new System.Drawing.Point(3, 528);
this.flowPanel3.Name = "flowPanel3";
this.flowPanel3.Size = new System.Drawing.Size(694, 38);
this.flowPanel3.TabIndex = 41;
this.flowPanel3.Text = "flowPanel3";
//
// dropdown_multi
//
this.dropdown_multi.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown_multi.Location = new System.Drawing.Point(3, 3);
this.dropdown_multi.Name = "dropdown_multi";
this.dropdown_multi.ShowArrow = true;
this.dropdown_multi.Size = new System.Drawing.Size(85, 32);
this.dropdown_multi.TabIndex = 2;
this.dropdown_multi.Text = "Items";
this.dropdown_multi.Trigger = AntdUI.Trigger.Hover;
this.dropdown_multi.Type = AntdUI.TTypeMini.Primary;
this.dropdown_multi.WaveSize = 0;
//
// label11
//
this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label11.Location = new System.Drawing.Point(3, 572);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(694, 24);
this.label11.TabIndex = 42;
this.label11.Text = "图标菜单";
//
// flowPanel4
//
this.flowPanel4.Controls.Add(this.dropdown_icon);
this.flowPanel4.Location = new System.Drawing.Point(3, 602);
this.flowPanel4.Name = "flowPanel4";
this.flowPanel4.Size = new System.Drawing.Size(694, 38);
this.flowPanel4.TabIndex = 43;
this.flowPanel4.Text = "flowPanel4";
//
// dropdown_icon
//
this.dropdown_icon.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown_icon.Location = new System.Drawing.Point(3, 3);
this.dropdown_icon.Name = "dropdown_icon";
this.dropdown_icon.ShowArrow = true;
this.dropdown_icon.Size = new System.Drawing.Size(85, 32);
this.dropdown_icon.TabIndex = 2;
this.dropdown_icon.Text = "Icon";
this.dropdown_icon.Trigger = AntdUI.Trigger.Hover;
this.dropdown_icon.Type = AntdUI.TTypeMini.Primary;
this.dropdown_icon.WaveSize = 0;
//
// label12
//
this.label12.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(3, 646);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(694, 24);
this.label12.TabIndex = 44;
this.label12.Text = "菜单状态";
//
// flowPanel7
//
this.flowPanel7.Controls.Add(this.dropdown_custom);
this.flowPanel7.Controls.Add(this.dropdown_enable);
this.flowPanel7.Controls.Add(this.dropdown_online);
this.flowPanel7.Location = new System.Drawing.Point(3, 676);
this.flowPanel7.Name = "flowPanel7";
this.flowPanel7.Size = new System.Drawing.Size(694, 38);
this.flowPanel7.TabIndex = 45;
this.flowPanel7.Text = "flowPanel7";
//
// dropdown_online
//
this.dropdown_online.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown_online.Location = new System.Drawing.Point(3, 3);
this.dropdown_online.Name = "dropdown_online";
this.dropdown_online.ShowArrow = true;
this.dropdown_online.Size = new System.Drawing.Size(85, 32);
this.dropdown_online.TabIndex = 2;
this.dropdown_online.Text = "在线状态";
this.dropdown_online.Trigger = AntdUI.Trigger.Hover;
this.dropdown_online.Type = AntdUI.TTypeMini.Primary;
this.dropdown_online.WaveSize = 0;
//
// dropdown_enable
//
this.dropdown_enable.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown_enable.Location = new System.Drawing.Point(94, 3);
this.dropdown_enable.Name = "dropdown_enable";
this.dropdown_enable.ShowArrow = true;
this.dropdown_enable.Size = new System.Drawing.Size(85, 32);
this.dropdown_enable.TabIndex = 5;
this.dropdown_enable.Text = "启用状态";
this.dropdown_enable.Trigger = AntdUI.Trigger.Hover;
this.dropdown_enable.Type = AntdUI.TTypeMini.Primary;
this.dropdown_enable.WaveSize = 0;
//
// dropdown_custom
//
this.dropdown_custom.BorderWidth = 2F;
this.dropdown_custom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dropdown_custom.Location = new System.Drawing.Point(185, 3);
this.dropdown_custom.Name = "dropdown_custom";
this.dropdown_custom.ShowArrow = true;
this.dropdown_custom.Size = new System.Drawing.Size(85, 32);
this.dropdown_custom.TabIndex = 6;
this.dropdown_custom.Text = "自定义";
this.dropdown_custom.Trigger = AntdUI.Trigger.Hover;
this.dropdown_custom.WaveSize = 0;
//
// DropDownDemo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "DropDownDemo";
this.Size = new System.Drawing.Size(700, 806);
this.stackPanel1.ResumeLayout(false);
this.flowPanel6.ResumeLayout(false);
this.flowPanel5.ResumeLayout(false);
this.flowPanel1.ResumeLayout(false);
this.flowPanel2.ResumeLayout(false);
this.flowPanel3.ResumeLayout(false);
this.flowPanel4.ResumeLayout(false);
this.flowPanel7.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private AntdUI.Label label1;
private AntdUI.Label label2;
private AntdUI.Label label3;
private AntdUI.Label label4;
private AntdUI.Label label5;
private AntdUI.StackPanel stackPanel1;
private AntdUI.FlowPanel flowPanel6;
private AntdUI.Dropdown dropdown33;
private AntdUI.Dropdown dropdown32;
private AntdUI.Dropdown dropdown31;
private AntdUI.Dropdown dropdown30;
private AntdUI.Dropdown dropdown28;
private AntdUI.Dropdown dropdown34;
private AntdUI.Label label8;
private AntdUI.FlowPanel flowPanel5;
private AntdUI.Dropdown dropdown26;
private AntdUI.Dropdown dropdown25;
private AntdUI.Label label7;
private AntdUI.Divider divider1;
private AntdUI.FlowPanel flowPanel1;
private AntdUI.Dropdown dropdown1;
private AntdUI.Dropdown dropdown2;
private AntdUI.Label label6;
private AntdUI.Dropdown dropdown3;
private AntdUI.FlowPanel flowPanel2;
private AntdUI.Dropdown dropdown4;
private AntdUI.Dropdown dropdown5;
private AntdUI.Dropdown dropdown6;
private AntdUI.Label label9;
private AntdUI.Label label11;
private AntdUI.FlowPanel flowPanel3;
private AntdUI.Dropdown dropdown_multi;
private AntdUI.Label label10;
private AntdUI.FlowPanel flowPanel4;
private AntdUI.Dropdown dropdown_icon;
private AntdUI.FlowPanel flowPanel7;
private AntdUI.Dropdown dropdown_online;
private AntdUI.Label label12;
private AntdUI.Dropdown dropdown_custom;
private AntdUI.Dropdown dropdown_enable;
}
}

97
Views/DropDownDemo.cs Normal file
View File

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AntdUIDemo.Views
{
public partial class DropDownDemo : UserControl
{
public DropDownDemo()
{
InitializeComponent();
InitData();
}
private void InitData()
{
dropdown_multi.Items.Clear();
dropdown_multi.Items.AddRange(new AntdUI.SelectItem[] {
new AntdUI.SelectItem("first menu item"),
new AntdUI.SelectItem("second menu item"),
new AntdUI.SelectItem("third menu item")
{
Sub = new List<object>{
new AntdUI.SelectItem("子菜单1"){
Sub=new List<object>{ new AntdUI.SelectItem("sub menu") {
Sub=new List<object>{
"one st menu item","two nd menu item","three rd menu item"
}
} }
},
new AntdUI.SelectItem( "子菜单2")
}
},
new AntdUI.SelectItem("fourth menu item") { Sub = new List<object> { "five menu item", "six six six menu item" } },
});
dropdown_icon.Items.Clear();
dropdown_icon.Items.AddRange(new AntdUI.SelectItem[] {
new AntdUI.SelectItem(Properties.Resources.,"first menu item"),
new AntdUI.SelectItem("second menu item"){
IconSvg = "<svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"search\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z\"></path></svg>",
},
new AntdUI.SelectItem("third menu item"){
IconSvg = "<svg viewBox=\"64 64 896 896\"><path d=\"M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z\"></path></svg>",
},
});
dropdown_online.Items.Clear();
dropdown_online.Items.AddRange(new AntdUI.SelectItem[] {
new AntdUI.SelectItem("first menu item"){
Online = 1
},
new AntdUI.SelectItem("Second menu item"){
Online = 0
}
});
dropdown_enable.Items.Clear();
dropdown_enable.Items.AddRange(new AntdUI.SelectItem[] {
new AntdUI.SelectItem("first menu item"){
Online = 1,
Enable = true
},
new AntdUI.SelectItem("Second menu item"){
Online = 0,
},
new AntdUI.SelectItem("Third menu item"){
Online = 0,
Enable = false
}
});
dropdown_custom.Items.Clear();
dropdown_custom.Items.AddRange(new AntdUI.SelectItem[] {
new AntdUI.SelectItem("first menu item"){
Online = 1,
OnlineCustom = Color.Orange,
},
new AntdUI.SelectItem("Second menu item"){
Online = 1,
OnlineCustom = Color.Tan,
},
new AntdUI.SelectItem("third menu item"){
Online = 1,
OnlineCustom = Color.FromArgb(14,176,201),
},
});
}
}
}

120
Views/DropDownDemo.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -59,13 +59,13 @@
this.select_align = new AntdUI.Select();
this.label10 = new AntdUI.Label();
this.label4 = new AntdUI.Label();
this.stackPanel2 = new AntdUI.StackPanel();
this.buttonCZ = new AntdUI.Button();
this.buttonClose = new AntdUI.Button();
this.divider1 = new AntdUI.Divider();
this.label3 = new AntdUI.Label();
this.label2 = new AntdUI.Label();
this.label1 = new AntdUI.Label();
this.stackPanel2 = new AntdUI.StackPanel();
this.buttonCZ = new AntdUI.Button();
this.buttonClose = new AntdUI.Button();
this.stackPanel1.SuspendLayout();
this.stackPanel6.SuspendLayout();
this.stackPanel5.SuspendLayout();
@ -76,13 +76,13 @@
//
// stackPanel1
//
this.stackPanel1.Controls.Add(this.stackPanel2);
this.stackPanel1.Controls.Add(this.stackPanel6);
this.stackPanel1.Controls.Add(this.stackPanel5);
this.stackPanel1.Controls.Add(this.label11);
this.stackPanel1.Controls.Add(this.stackPanel4);
this.stackPanel1.Controls.Add(this.stackPanel3);
this.stackPanel1.Controls.Add(this.label4);
this.stackPanel1.Controls.Add(this.stackPanel2);
this.stackPanel1.Controls.Add(this.divider1);
this.stackPanel1.Controls.Add(this.label3);
this.stackPanel1.Controls.Add(this.label2);
@ -103,7 +103,7 @@
this.stackPanel6.Controls.Add(this.label15);
this.stackPanel6.Controls.Add(this.input_badge);
this.stackPanel6.Controls.Add(this.label17);
this.stackPanel6.Location = new System.Drawing.Point(3, 345);
this.stackPanel6.Location = new System.Drawing.Point(3, 301);
this.stackPanel6.Name = "stackPanel6";
this.stackPanel6.Size = new System.Drawing.Size(694, 32);
this.stackPanel6.TabIndex = 20;
@ -177,7 +177,7 @@
this.stackPanel5.Controls.Add(this.label13);
this.stackPanel5.Controls.Add(this.select_round);
this.stackPanel5.Controls.Add(this.label14);
this.stackPanel5.Location = new System.Drawing.Point(3, 307);
this.stackPanel5.Location = new System.Drawing.Point(3, 263);
this.stackPanel5.Name = "stackPanel5";
this.stackPanel5.Size = new System.Drawing.Size(694, 32);
this.stackPanel5.TabIndex = 19;
@ -253,7 +253,7 @@
// label11
//
this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.label11.Location = new System.Drawing.Point(3, 277);
this.label11.Location = new System.Drawing.Point(3, 233);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(694, 24);
this.label11.TabIndex = 18;
@ -267,7 +267,7 @@
this.stackPanel4.Controls.Add(this.label7);
this.stackPanel4.Controls.Add(this.input_size);
this.stackPanel4.Controls.Add(this.label9);
this.stackPanel4.Location = new System.Drawing.Point(3, 239);
this.stackPanel4.Location = new System.Drawing.Point(3, 195);
this.stackPanel4.Name = "stackPanel4";
this.stackPanel4.Size = new System.Drawing.Size(694, 32);
this.stackPanel4.TabIndex = 17;
@ -350,7 +350,7 @@
this.stackPanel3.Controls.Add(this.label6);
this.stackPanel3.Controls.Add(this.select_align);
this.stackPanel3.Controls.Add(this.label10);
this.stackPanel3.Location = new System.Drawing.Point(3, 201);
this.stackPanel3.Location = new System.Drawing.Point(3, 157);
this.stackPanel3.Name = "stackPanel3";
this.stackPanel3.Size = new System.Drawing.Size(694, 32);
this.stackPanel3.TabIndex = 16;
@ -427,44 +427,12 @@
// label4
//
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.label4.Location = new System.Drawing.Point(3, 171);
this.label4.Location = new System.Drawing.Point(3, 127);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(694, 24);
this.label4.TabIndex = 15;
this.label4.Text = "控件配置";
//
// stackPanel2
//
this.stackPanel2.Controls.Add(this.buttonCZ);
this.stackPanel2.Controls.Add(this.buttonClose);
this.stackPanel2.Location = new System.Drawing.Point(3, 127);
this.stackPanel2.Name = "stackPanel2";
this.stackPanel2.Size = new System.Drawing.Size(694, 38);
this.stackPanel2.TabIndex = 14;
this.stackPanel2.Text = "stackPanel2";
//
// buttonCZ
//
this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonCZ.Location = new System.Drawing.Point(84, 3);
this.buttonCZ.Name = "buttonCZ";
this.buttonCZ.Size = new System.Drawing.Size(75, 32);
this.buttonCZ.TabIndex = 4;
this.buttonCZ.Text = "重 置";
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
this.buttonCZ.WaveSize = 0;
//
// buttonClose
//
this.buttonClose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonClose.Location = new System.Drawing.Point(3, 3);
this.buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(75, 32);
this.buttonClose.TabIndex = 3;
this.buttonClose.Text = "关 闭";
this.buttonClose.Type = AntdUI.TTypeMini.Error;
this.buttonClose.WaveSize = 0;
//
// divider1
//
this.divider1.Location = new System.Drawing.Point(3, 109);
@ -499,6 +467,38 @@
this.label1.TabIndex = 2;
this.label1.Text = "FloatButton 悬浮按钮";
//
// stackPanel2
//
this.stackPanel2.Controls.Add(this.buttonCZ);
this.stackPanel2.Controls.Add(this.buttonClose);
this.stackPanel2.Location = new System.Drawing.Point(3, 339);
this.stackPanel2.Name = "stackPanel2";
this.stackPanel2.Size = new System.Drawing.Size(694, 38);
this.stackPanel2.TabIndex = 21;
this.stackPanel2.Text = "stackPanel2";
//
// buttonCZ
//
this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonCZ.Location = new System.Drawing.Point(84, 3);
this.buttonCZ.Name = "buttonCZ";
this.buttonCZ.Size = new System.Drawing.Size(75, 32);
this.buttonCZ.TabIndex = 4;
this.buttonCZ.Text = "重 置";
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
this.buttonCZ.WaveSize = 0;
//
// buttonClose
//
this.buttonClose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.buttonClose.Location = new System.Drawing.Point(3, 3);
this.buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(75, 32);
this.buttonClose.TabIndex = 3;
this.buttonClose.Text = "关 闭";
this.buttonClose.Type = AntdUI.TTypeMini.Error;
this.buttonClose.WaveSize = 0;
//
// FloatButtonDemo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -552,9 +552,9 @@
private AntdUI.Select select_align;
private AntdUI.Label label10;
private AntdUI.Label label4;
private AntdUI.Divider divider1;
private AntdUI.StackPanel stackPanel2;
private AntdUI.Button buttonCZ;
private AntdUI.Button buttonClose;
private AntdUI.Divider divider1;
}
}

View File

@ -98,7 +98,7 @@ namespace AntdUIDemo.Views
IconSvg = "<svg t=\"1724131255903\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1768\" width=\"200\" height=\"200\"><path d=\"M511.878001 1023.989c-62.999385 0-124.098788-11.699886-181.698225-34.999658-55.699456-22.49978-105.798967-54.499468-148.798547-95.599067-43.099579-40.9996-76.899249-88.899132-100.599018-142.198611-24.59976-55.29946-36.999639-114.098886-36.999639-174.698294 0-76.79925 20.699798-152.498511 59.899415-219.197859 37.799631-64.099374 92.299099-119.098837 157.498462-158.598451 14.699856-8.999912 33.899669-4.299958 42.899581 10.499897 8.999912 14.699856 4.299958 33.899669-10.499897 42.899581-56.399449 34.199666-103.498989 81.599203-136.19867 137.098661-33.599672 56.999443-51.1995 121.798811-51.1995 187.39817 0 102.498999 41.99959 199.098056 118.298845 271.697347 76.699251 73.099286 178.798254 113.298894 287.497192 113.298893s210.797941-40.299606 287.497193-113.298893c76.299255-72.799289 118.298845-169.198348 118.298844-271.797346 0-130.298728-68.699329-250.797551-183.798205-322.296852-14.599857-9.099911-19.099813-28.299724-9.999902-42.99958 9.099911-14.599857 28.299724-19.099813 42.99958-9.999903 64.099374 39.799611 117.498853 94.599076 154.59849 158.398453 38.399625 66.099354 58.699427 140.998623 58.699427 217.09788 0 60.599408-12.499878 119.398834-36.999639 174.698294-23.699769 53.299479-57.499438 101.199012-100.599017 142.198612-42.99958 40.899601-93.099091 73.099286-148.798547 95.599066-57.799436 23.099774-118.998838 34.79966-181.998223 34.79966zM511.878001 506.394055c-17.199832 0-31.199695-13.899864-31.199695-31.199696v-443.995664c0-17.199832 13.899864-31.199695 31.199695-31.199695 17.199832 0 31.199695 13.899864 31.199696 31.199695v443.895665c0.099999 17.199832-13.999863 31.299694-31.199696 31.299695z\" p-id=\"1769\"></path></svg>",
Round = select_round.SelectedIndex == 0,
Type = (TTypeMini)select_type.SelectedValue,
Radius = Convert.ToInt32(input_radius.Value),
Radius = (int)input_radius.Value,
Badge = input_badge.Text,
BadgeSize = (float)input_badgesize.Value,
BadgeBack = colorPicker.Value,
@ -109,7 +109,7 @@ namespace AntdUIDemo.Views
Tooltip = "资源图片按钮",
Round = select_round.SelectedIndex == 0,
Type = (TTypeMini)select_type.SelectedValue,
Radius = Convert.ToInt32(input_radius.Value),
Radius = (int)input_radius.Value,
Badge = input_badge.Text,
BadgeSize = (float)input_badgesize.Value,
BadgeBack = colorPicker.Value,
@ -120,7 +120,7 @@ namespace AntdUIDemo.Views
Tooltip = "文本按钮",
Round = select_round.SelectedIndex == 0,
Type = (TTypeMini)select_type.SelectedValue,
Radius = Convert.ToInt32(input_radius.Value),
Radius = (int)input_radius.Value,
Badge = input_badge.Text,
BadgeSize = (float)input_badgesize.Value,
BadgeBack = colorPicker.Value,
@ -144,11 +144,11 @@ namespace AntdUIDemo.Views
//是否置顶
TopMost = select_topmost.SelectedIndex == 0,
//尺寸大小
Size = Convert.ToInt32(input_size.Value),
Size = (int)input_size.Value,
//相对于Align位置X轴偏移
MarginX = Convert.ToInt32(input_mx.Value),
MarginX = (int)input_mx.Value,
//相对于Align位置Y轴偏移
MarginY = Convert.ToInt32(input_my.Value),
MarginY = (int)input_my.Value,
});
}
}
@ -164,20 +164,6 @@ namespace AntdUIDemo.Views
}
}
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
CloseFloatButtonForm();
LoadFloatButton();
}
// 关闭
private void buttonClose_Click(object sender, EventArgs e)
{
CloseFloatButtonForm();
}
#region EventHandler
private void select_intvalue_SelectedIndexChanged(object sender, int value)
{
@ -202,6 +188,20 @@ namespace AntdUIDemo.Views
CloseFloatButtonForm();
LoadFloatButton();
}
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
CloseFloatButtonForm();
LoadFloatButton();
}
// 关闭
private void buttonClose_Click(object sender, EventArgs e)
{
CloseFloatButtonForm();
}
#endregion

View File

@ -72,17 +72,6 @@ namespace AntdUIDemo.Views
input_gap.ValueChanged += input_gap_ValueChanged;
}
private void select_intvalue_SelectedIndexChanged(object sender, int value)
{
flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
}
private void input_gap_ValueChanged(object sender, decimal value)
{
flowPanel.Gap = (int)input_gap.Value;
}
// 初始化下拉框
private void InitSelectItems()
{
@ -93,7 +82,17 @@ namespace AntdUIDemo.Views
select_align.Items.Add(align);
}
}
#region
private void select_intvalue_SelectedIndexChanged(object sender, int value)
{
flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
}
private void input_gap_ValueChanged(object sender, decimal value)
{
flowPanel.Gap = (int)input_gap.Value;
}
// 添加按钮
private void buttonADD_Click(object sender, EventArgs e)
{
@ -126,6 +125,7 @@ namespace AntdUIDemo.Views
InitData();
LoadFlowPanel();
}
#endregion
}
}

View File

@ -35,16 +35,6 @@ namespace AntdUIDemo.Views
input_gap.ValueChanged += input_gap_ValueChanged;
}
private void input_gap_ValueChanged(object sender, decimal value)
{
LoadGridPanel(input_span.Text, input_gap.Value);
}
private void input_span_TextChanged(object sender, EventArgs e)
{
LoadGridPanel(input_span.Text, input_gap.Value);
}
private void LoadGridPanel(string spantext, decimal gap)
{
gridPanel.Controls.Clear();
@ -63,11 +53,22 @@ namespace AntdUIDemo.Views
}
}
#region
private void input_gap_ValueChanged(object sender, decimal value)
{
LoadGridPanel(input_span.Text, input_gap.Value);
}
private void input_span_TextChanged(object sender, EventArgs e)
{
LoadGridPanel(input_span.Text, input_gap.Value);
}
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
LoadGridPanel(input_span.Text, 0);
}
#endregion
}
}

View File

@ -139,7 +139,7 @@
this.panel.Name = "panel";
this.panel.Shadow = 12;
this.panel.ShadowOpacityAnimation = true;
this.panel.Size = new System.Drawing.Size(360, 260);
this.panel.Size = new System.Drawing.Size(360, 298);
this.panel.TabIndex = 35;
this.panel.Text = "panel1";
//

View File

@ -56,13 +56,6 @@ namespace AntdUIDemo.Views
}
}
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
LoadPanel();
}
// 设置默认值
private void InitData()
{
@ -121,6 +114,13 @@ namespace AntdUIDemo.Views
{
LoadPanel();
}
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
LoadPanel();
}
#endregion
}