maui-404710-utility-controls-button-custom-appearance.md
DXButton and DXToggleButton contain a set of properties that you can use to customize button appearance:
ThemeSeedColorGets or sets the primary key color of the applied theme. This is a bindable property.CornerRadiusGets or sets the corner radius of the button. This is a bindable property.PaddingGets or sets the amount of space around the button. This is a bindable property.
You can use the following properties to customize the button’s alignment:
TextHorizontalAlignmentGets or sets the text horizontal alignment within the button’s content. This is a bindable property.TextVerticalAlignmentGets or sets the text vertical alignment within the button’s content. This is a bindable property.VerticalContentAlignmentGets or sets the vertical alignment of the button’s content (icon and text). This is a bindable property.HorizontalContentAlignmentGets or sets the horizontal alignment of the button’s content (icon and text). This is a bindable property.IconPlacementGets or sets the icon position within the button’s content. This is a bindable property.
You can use the following properties to change the button’s background color:
CheckedBackgroundColorGets or sets the background color of the toggle button in the checked state. This is a bindable property.PressedBackgroundColorGets or sets the background color of the button in the pressed state. This is a bindable property.CheckedPressedBackgroundColorGets or sets the background color of the toggle button in checked and pressed states. This is a bindable property.DisabledBackgroundColorGets or sets the background color of the button in the disabled state. This is a bindable property.CheckedDisabledBackgroundColorGets or sets the background color of the toggle button in checked and disabled states. This is a bindable property.
You can use the following properties to customize the button’s border:
BorderColorGets or sets the border color of the button. This is a bindable property.BorderThicknessGets or sets the border thickness of the button. This is a bindable property.CheckedBorderColorGets or sets the border color of the toggle button in the checked state. This is a bindable property.PressedBorderColorGets or sets the border color of the button in the pressed state. This is a bindable property.CheckedPressedBorderColorGets or sets the border color of the toggle button in checked and pressed states. This is a bindable property.DisabledBorderColorGets or sets the border color of the button in the disabled state. This is a bindable property.CheckedDisabledBorderColorGets or sets the border color of the toggle button in checked and disabled states. This is a bindable property.
You can use the following properties to display and customize the button’s icon:
IconGets or sets the icon image within the button’s content. This is a bindable property.ShowIconGets or sets whether to show an icon within the button’s content. This is a bindable property.IconAspectGets or sets the icon scale within the button’s content. This is a bindable property.IconColorGets or sets the icon color within the button’s content. This is a bindable property.CheckedIconColorGets or sets the icon color of the toggle button in the checked state. This is a bindable property.PressedIconColorGets or sets the icon color of the button in the pressed state. This is a bindable property.CheckedPressedIconColorGets or sets the icon color of the toggle button in checked and pressed states. This is a bindable property.DisabledIconColorGets or sets the icon color of the button in the disabled state. This is a bindable property.CheckedDisabledIconColorGets or sets the icon color of the toggle button in checked and disabled states. This is a bindable property.IconColorizationEnabledGets or sets whether to change the icon color within the button’s content. This is a bindable property.IconHeightGets or sets the icon height within the button’s content. This is a bindable property.IconWidthGets or sets the icon width within the button’s content. This is a bindable property.IconIndentGets or sets the distance between icon and text within the button’s content. This is a bindable property.IconPlacementGets or sets the icon position within the button’s content. This is a bindable property.
You can use the following properties to display and customize the text font of a button:
FontFamilyGets or sets the button’s text font. This is a bindable property.FontSizeGets or sets the text font size within the button’s content. This is a bindable property.FontAttributesGets or sets whether the button’s text font style is bold, italic, or unmodified. This is a bindable property.FontAutoScalingEnabledGets or sets whether the button’s text reflects font scaling preferences set in the operating system. This is a bindable property.TextColorGets or sets the text color within the button’s content. This is a bindable property.CheckedTextColorGets or sets the text color of the toggle button in the checked state. This is a bindable property.PressedTextColorGets or sets the text color of the button in the pressed state. This is a bindable property.CheckedPressedTextColorGets or sets the text color of the toggle button in checked and pressed states. This is a bindable property.DisabledTextColorGets or sets the text color of the button in the disabled state. This is a bindable property.CheckedDisabledTextColorGets or sets the text color of the toggle button in checked and disabled states. This is a bindable property.TextCharacterSpacingGets or sets the distance between text characters within the button’s content. This is a bindable property.TextDecorationsGets or sets whether the text decoration within the button’s content is strikethrough, underline, or unmodified. This is a bindable property.TextHorizontalAlignmentGets or sets the text horizontal alignment within the button’s content. This is a bindable property.TextVerticalAlignmentGets or sets the text vertical alignment within the button’s content. This is a bindable property.TextLineBreakModeGets or sets the line breaking mode for text within the button’s content. This is a bindable property.TextLineHeightGets or sets the vertical distance between lines of text within the button’s content. This is a bindable property.TextMaxLinesGets or sets the maximum number of text lines within the button’s content. This is a bindable property.
Buttons display an animation when you tap them. You can use the following properties to customize this animation:
AnimationDurationGets or sets the duration of the button click animation. This is a bindable property.PressedScaleGets or sets the scale for the button in the pressed state.