-
Notifications
You must be signed in to change notification settings - Fork 3
Buttons
Håvard Moås edited this page Oct 18, 2023
·
12 revisions
A button initiates an instantaneous action when people tap it.
A button can change its visual style based on size, color, and shape. The styles available for you to use can be found here. A Button can have several different styles:
By default the button's style is set to
PrimaryLarge.
<dui:Button Style="{dui:Styles Button=SecondaryLarge}"
Text="Button"
Command="{Binding Something}" /><dui:Button Style="{dui:Styles Button=SecondaryRoundedLarge}"
ImageSource="{dui:Icons bell_line}"
Command="{Binding Something}" />Do not use
Textwith aImageSourcewhen creating rounded buttons, as this will lead to bad UX.
In the following example a Button's Image is set to the right side of the Button's text. Also the Button's style is implicitly set to PrimaryLarge.
<dui:Button ImageSource="{dui:Icons bell_line}"
ImagePlacement="Right"
Text="Button"
Command="{Binding Something}" />Inspect the components properties class to further customize and use it.
Components
- Buttons
- Checkboxes
- Chip
- CollectionView
- Content control
- Context Menus
- Counters
- Divider
- Labels
- ListItem
- Pickers
- SaveView
- SortControl
- Tag
- TextFields
- Toolbar
Feedback & State
Guides
Interaction & Accessibility
Layout & Navigation
Media
Styling & Resources