Skip to content
On this page

IconButton

Icon buttons help people take minor actions with one tap.

  • Icon buttons must use a system icon with a clear meaning
  • Four types: FilledIconButtonStyle, FilledTonal ButtonStyle, OutlinedButtonStyle and StandardButtonStyle
  • On hover, display a tooltip describing the button’s action (not the name of the icon)
  • Use outline-style icons to indicate an unselected state, and filled-style icons for selected state

Examples

xml
<...
	xmlns:icon="clr-namespace:IconPacks.IconKind;assembly=IconPacks.Material"
...>

<mdc:IconButton IconData="{Static icon:Material.Star}" Style="{DynamicResource FilledIconButtonStyle}" />
<mdc:IconButton IconKind="{Static icon:Material.Star}" Style="{DynamicResource FilledTonalIconButtonStyle}" />
<mdc:IconButton IconKind="{Static icon:Material.Star}" Style="{DynamicResource OutlinedIconButtonStyle}" />
<mdc:IconButton IconKind="{Static icon:Material.Star}" Style="{DynamicResource StandardIconButtonStyle}" />

Properties

nametypedefalut
IconDatastringempty
BackgroundColorColorstyle
ShapeShapestyle
ElevationElevationstyle
OutlineWidthintstyle
OutlineColorColorstyle
StateLayerColorColorstyle
RippleDurationfloat0.5
RippleEasingEasingSinInOut
ContextMenuContextMenu
StyleStyleFilled
CommandICommand
CommandParameterobject

Events

nametype
ClickedEventHandler<TouchEventArgs>
PressedEventHandler<TouchEventArgs>
ReleasedEventHandler<TouchEventArgs>
LongPressedEventHandler<TouchEventArgs>
RightClicked ( desktop only )EventHandler<TouchEventArgs>