SegmentedBase class
이 콘텐츠는 아직 번역되지 않았습니다.
Shared base for the joined-segment strip controls (SegmentedControl, ButtonGroup). Owns the content model (items + template + per-container prepare hook), the segment containers (SegmentButton), the sizing panel, and the chrome: it paints the outer rounded border and the dividers between segments, while each segment paints only its background. This keeps the frame and dividers independent of any child’s state and stable across fractional DPI.
Guide: C# Markup reference: Button
The base carries no selection. SegmentedControl adds exclusive single selection; ButtonGroup leaves segments independent (per-segment click / toggle).
public abstract class SegmentedBase : ControlPublic Members
Section titled “Public Members”| name | description |
|---|---|
| ItemPadding { get; set; } | Gets or sets the per-segment padding; the strip height follows the control, so use a small value for a compact, icon-only strip. |
| ItemsSource { get; set; } | Gets or sets the items source; the default is an empty selectable view. |
| ItemTemplate { get; set; } | Gets or sets the segment template; unset, a centered text template is used. |
| Sizing { get; set; } | Gets or sets how segments are sized along the horizontal axis. |
| static readonly ItemPaddingProperty | Gets or sets the per-segment padding (mirrors ItemPadding). The strip height follows the control, so use a small value for a compact, icon-only strip. The container’s Padding stays the outer padding. |
| const PART_ITEMS_HOST | The host part of a template: a Border the control puts its segment strip into. The strip is the control’s own working element, so a template without this part cannot show the segments. |
See Also
Section titled “See Also”- class Control
- namespace Aprillz.MewUI.Controls