mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2025-12-06 16:09:14 +08:00
2.3 KiB
2.3 KiB
Popover
The floating card pops up when clicking/mouse hovering over an element.
Popover.Config
Configure Popover
| Name | Description | Type | Default Value |
|---|---|---|---|
| Control | Belonging Control | Form | Required |
| Title | Title | string | null |
| Content | Control/Content | object | Required |
| Font | Font | Font | null |
| AutoClose | Automatic shutdown time(s) 0 equals not closing |
int | 0 |
| Radius | Rounded corners | int | 6 |
| ArrowAlign | Arrow direction | TAlign | Bottom |
| ArrowSize | Arrow size | int | 8 |
| Offset | Offset | Rectangle / RectangleF | null |
| CustomPoint 🔴 | Custom Location | Rectangle? |
null |
| Focus 🔴 | Get Focus | bool | true |
| Tag | User defined data | object? |
null |
| OnControlLoad | Callback after the control is displayed | Action? |
null |
Popover.TextRow
Multiple column text
Using arrays/collections to give contentUsed for displaying text or interactive links of multiple colors in a single lineAntdUI.Popover.open(button1, new AntdUI.Popover.TextRow[] { new AntdUI.Popover.TextRow("You have"), new AntdUI.Popover.TextRow("3", 2, AntdUI.Style.Db.Primary), new AntdUI.Popover.TextRow("new retail orders waiting to be confirmed and processed"), new AntdUI.Popover.TextRow("Look", 2, AntdUI.Style.Db.Primary) { Call = () => { MessageBox.Show("Click to look"); } }, }, AntdUI.TAlign.BL);
| Name | Description | Type | Default Value |
|---|---|---|---|
| Text | Text | string | Required |
| Gap | Gap Left and right spacing |
int | 0 |
| Fore | Text color | Color? |
null |
| Font | Font | Font? |
null |
| Call | Click on callback Mouse clickable |
Action | null |
UserControl Monitoring Load Example
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");
}
}
