mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-03-26 15:40:44 +08:00
2.7 KiB
2.7 KiB
Segmented
Segmented 分段控制器 👚
分段控制器。
- 默认属性:Items
- 默认事件:SelectIndexChanged
属性
| 名称 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| OriginalBackColor | 原装背景颜色 | Color | Transparent |
| AutoSize | 自动大小 | bool | false |
| Full | 是否铺满 | bool | false |
| Radius | 圆角 | int | 6 |
| Round | 圆角样式 | bool | false |
| ForeColor | 文字颜色 | Color? |
null |
| ForeHover | 悬停文字颜色 | Color? |
null |
| ForeActive | 激活文字颜色 | Color? |
null |
| BackColor | 背景颜色 | Color? |
null |
| BackHover | 悬停背景颜色 | Color? |
null |
| BackActive | 激活背景颜色 | Color? |
null |
| Gap | 间距 | int | 0 |
| Vertical | 是否竖向 | bool | false |
| IconAlign | 图标对齐方向 | TAlignMini | Top |
| IconRatio | 图标比例 | float? |
null |
| IconGap | 图标与文字间距比例 | float | 0.2F |
| BarPosition | 线条位置 | TAlignMini | None |
| BarSize | 条大小 | float | 3F |
| BarPadding | 条边距 | int | 0 |
| BarRadius | 条圆角 | int | 0 |
| Items | 集合 SegmentedItem[] |
SegmentedItem[] | [] |
| SelectIndex | 选择序号 | int | 0 |
| PauseLayout | 暂停布局 | bool | false |
事件
| 名称 | 描述 | 返回值 | 参数 |
|---|---|---|---|
| SelectIndexChanged | SelectIndex 属性值更改时发生 | void | int index 序号 |
| ItemClick | 项点击时发生 | void | MouseEventArgs e 点击, SegmentedItem value |
数据
SegmentedItem
| 名称 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| ID | ID | string? |
null |
| Icon | 图标 | Image? |
null |
| IconSvg | 图标SVG | string? |
null |
| IconActive | 图标激活 | Image? |
null |
| IconActiveSvg | 图标激活SVG | string? |
null |
| Text | 文本 | string? |
null |
| 🌏 LocalizationText | 国际化文本 | string? |
null |
| Enabled | 使能 | bool | true |
| Tag | 用户定义数据 | object? |
null |
| Badge | 徽标文本 | string? |
null |
| BadgeSvg | 徽标SVG | string? |
null |
| BadgeAlign | 徽标方向 | TAlignFrom | TR |
| BadgeSize | 徽标大小 | float | 0.6F |
| BadgeMode | 徽标模式(镂空) | bool | false |
| BadgeOffsetX | 徽标偏移X | float | 0 |
| BadgeOffsetY | 徽标偏移Y | float | 0 |
| BadgeBack | 徽标背景颜色 | Color? |
null |