콘텐츠로 이동

SegmentButton class

이 콘텐츠는 아직 번역되지 않았습니다.

The segment container used by SegmentedBase (SegmentedControl / ButtonGroup). A lightweight ContentControl that paints only its own background (rounded at the strip ends); the owning control draws the outer border and the dividers on top. State split:

Guide: C# Markup reference: Button

A SegmentedControl drives IsChecked exclusively (selection); a ButtonGroup segment flips it per-click when checkable. Independent action segments can invoke a semantic Command and may also raise Click.

public sealed class SegmentButton : CommandSourceControl
name description
SegmentButton() The default constructor.
IsCheckable { get; set; } Gets or sets whether a mouse click flips IsChecked (independent toggle).
IsChecked { get; set; } Gets or sets the active-fill visual state (selected or toggled-on).
event CheckedChanged Occurs when IsChecked flips due to a click (checkable segments only).
event Click Occurs when the segment is activated by a mouse click or keyboard input.
static readonly CommandProperty Compatibility alias for CommandProperty, which now owns the slot.
static readonly IsCheckedProperty