콘텐츠로 이동

ToolBarExtensions.Toggle method (1 of 2)

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

Adds an entry that stays visibly pressed while its state is on.

public static ToolBarGroup Toggle(this ToolBarGroup group, Command command, bool isChecked = false)
parameter description
group Target group.
command Command the entry runs.
isChecked Whether the entry starts on.

The group for chaining.


Adds a toggle entry that runs a command with data as the invocation argument.

public static ToolBarGroup Toggle(this ToolBarGroup group, Command command, object data,
IconTemplate? icon = null)
parameter description
group Target group.
command Command the entry runs.
data Value passed to the command.
icon Icon shown instead of the command’s own, or null to show the command’s.

The group for chaining.