c#winfrom custom control, `has better operation support for touch screen`, the project is based on framework4.0, completely native control development, `do not use any third-party controls`, you can use it safely in your project .
Welcome to exchange discussion: [Click to join QQ group 568015492](//shang.qq.com/wpa/qunwpa?idkey=6e08741ef16fe53bf0314c1c9e336c4f626047943a8b76bac062361bab6b4f8d)
>C# winfrom custom control, `better operation support for touch screen', project is based on framework 4.0, completely native control development, `no use of any third-party controls', you can rest assured that in your project.
#### If my code is useful to you, please reward me, thank you, your reward is my motivation.
#### The source code is only for exchange learning. The open source agreement is [GPL-3.0](https://gitee.com/kwwwvagaa/net_winform_custom_control/blob/master/LICENSE). For commercial use, please contact the group owner.
>#### The source code is only for communicative learning, and the open source protocol is [GPL-3.0](https://gitee.com/kwwwvagaa/net_winform_custom_control/blob/master/LICENSE). For commercial use, please contact the QQ group master authorization.
If(FrmDialog.ShowDialog(this,"Do you want to display a prompt box without a cancel button?","Mode Form Test",true)==System.Windows.Forms.DialogResult.OK)
If(FrmDialog.ShowDialog(this,"Do you want to display a prompt box without a cancel button?","Mode Form Test",true)==System.Windows.Forms.DialogResult.OK)
{
{
FrmDialog.ShowDialog(this,"This is a prompt box without a cancel button","Mode Form Test");
FrmDialog.ShowDialog(this,"This is a prompt box without a cancel button","Mode Form Test");
> When using the paging control, you no longer need to specify the DataSource data source property, just specify the DataSource property of the page turning control
> When using the paging control, you no longer need to specify the DataSource data source property, just specify the DataSource property of the page turning control
>如果预置的表格行无法满足你的需求,你还可以自定义行控件,具体做法为:
1. 新增自定义控件,实现接口IDataGridViewRow
2. 参照UCDataGridViewRow实现你自定义的行
3. 设置datagridview的RowType属性即可
> If the preset table row does not meet your needs, you can also customize the row control by:
> If the preset table row does not meet your needs, you can also customize the row control by:
1. Add a custom control to implement the interface IDataGridViewRow
1. Add a custom control to implement the interface IDataGridViewRow
2. Implement your custom line with UCDataGridViewRow
2. Implement your custom line with UCDataGridViewRow
>Page property defines the page turning control. If UCPagerControl does not meet your needs, please customize the page turning control and inherit UCPagerControlBase.
>Page property defines the page turning control. If UCPagerControl does not meet your needs, please customize the page turning control and inherit UCPagerControlBase.
When the page flip control is not enabled when it is empty, the appropriate data will be displayed on each page when the page flip control is enabled, and the scroll bar no longer appears.
When the page flip control is not enabled when it is empty, the appropriate data will be displayed on each page when the page flip control is enabled, and the scroll bar no longer appears.
>If UCPagerControl does not meet your needs, please customize the page flip control and inherit UCPagerControlBase, such as changing the style, adding logic, etc.
>If UCPagerControl does not meet your needs, please customize the page flip control and inherit UCPagerControlBase, such as changing the style, adding logic, etc.
> The page flip control can be used for any list-type control. The above code example only uses the datagridview to illustrate usage. The usage is as follows:
> The page flip control can be used for any list-type control. The above code example only uses the datagridview to illustrate usage. The usage is as follows:
1. Set the property DataSource data source
1. Set the property DataSource data source
2. Set the property PageSize to display the amount of data per page.
2. Set the property PageSize to display the amount of data per page.
/ / This form is generally used in the time-consuming thread operation to display the waiting animation, the following is a multi-threaded time-consuming operation example
// This form is generally used in the time-consuming thread operation to display the waiting animation, the following is a multi-threaded time-consuming operation example
ControlHelper.ThreadRunExt(this, () =>
ControlHelper.ThreadRunExt(this, () =>
{
{
Thread.Sleep(5000);
Thread.Sleep(5000);
...
@@ -605,154 +363,110 @@ Public static void ThreadRunExt(
...
@@ -605,154 +363,110 @@ Public static void ThreadRunExt(
> If you want to modify the node style, such as the background color, you can use UCMenu's ParentItemStyles or ChildrenItemStyles, such as
> If you want to modify the node style, such as the background color, you can use UCMenu's ParentItemStyles or ChildrenItemStyles, such as
``` csharp
``` csharp
this.ucMenu1.ParentItemStyles = new Dictionary<string, object>() { {"BackColor",Color.Red } };
this.ucMenu1.ParentItemStyles = new Dictionary<string, object>() { {"BackColor",Color.Red } };
this.ucMenu1.ChildrenItemStyles = new Dictionary<string, object>() { {"BackColor",Color.Yellow } };
this.ucMenu1.ChildrenItemStyles = new Dictionary<string, object>() { {"BackColor",Color.Yellow } };
```
```
>菜单默认显示样式为Fill,当菜单项较多时会导致子项无法显示,此时你应修改菜单样式为Top即可
> The default display style of the menu is Fill. When there are more menu items, the sub-items cannot be displayed. In this case, you should modify the menu style to Top.
> The default display style of the menu is Fill. When there are more menu items, the sub-items cannot be displayed. In this case, you should modify the menu style to Top.