A panel that slides out from the edge of the screen.
Configure Drawer
| Name | Description | Type | Default Value |
|---|---|---|---|
| Form | Belonging window | Form | Required |
| Content | Content | Control | Required |
| Mask | Display mask or not | bool | true |
| MaskClosable | Click whether to allow the mask to be closed | bool | true |
| Padding | Padding | int | 24 |
| Align | Align | TAlignMini | Right |
| Dispose | Should it be released | bool | true |
| Tag | User defined data | object? |
null |
| OnLoad | Load callback | Action? |
null |
| OnClose | Close callback | Action? |
null |
| DisplayDelay 🔴 | Display Delay Adding delay can effectively avoid competing with Mask animation |
int | 100 |
public partial class UserControl1 : UserControl, AntdUI.ControlEvent
{
public void LoadCompleted()
{
System.Diagnostics.Debug.WriteLine("Load");
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
System.Diagnostics.Debug.WriteLine("Close");
}
}private async void button1_Click(object sender, EventArgs e)
{
var usercontrol = new UserControl1(form);
await AntdUI.Drawer.wait(form, usercontrol, AntdUI.TAlignMini.Left);
System.Diagnostics.Debug.WriteLine("End:" + usercontrol.ToString());
}