The default style of the repeatButton is not recommended for direct use and should always be used by other styles in the BasedOn mode.
All repeatButtons that inherit this style can use the additional properties defined in IconElement to control the properties of the geometry in the repeatButton.
All repeatButtons that inherit this style can use the BorderElement.CornerRadius attached property to control the fillet size of the repeatButton.
Example:
1 2 3 4 5 6
<StackPanelOrientation="Horizontal"> <RepeatButtonContent="This is a RepeatButton"/> <RepeatButtonContent="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonContent="This is a RepeatButton"Margin="10,0,0,0" hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonPrimary : RepeatButtonBaseStyle
Main RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonPrimary}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonPrimary}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonPrimary}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonSuccess : RepeatButtonBaseStyle
Success RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonSuccess}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonSuccess}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonSuccess}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatRepeatButtonInfo : RepeatButtonBaseStyle
Information RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonInfo}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonInfo}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonInfo}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonWarning : RepeatButtonBaseStyle
Warning RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonWarning}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonWarning}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonWarning}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonDanger : RepeatButtonBaseStyle
Danger RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonDanger}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonDanger}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonDanger}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonDefault : RepeatButtonBaseStyle
Default RepeatButton
Example:
1 2 3 4 5
<StackPanelOrientation="Horizontal"> <RepeatButtonStyle="{StaticResource RepeatButtonDefault}"Content="This is a RepeatButton"/> <RepeatButtonStyle="{StaticResource RepeatButtonDefault}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:BorderElement.CornerRadius="15"/> <RepeatButtonStyle="{StaticResource RepeatButtonDefault}"Content="This is a RepeatButton"Margin="10,0,0,0"hc:IconElement.Geometry="{StaticResource GithubGeometry}"/> </StackPanel>
RepeatButtonIcon : RepeatButtonBaseStyle
This style is recommended if you only want to display the geometry RepeatButton.
This style is recommended if you want to fully customize the content of the RepeatButton. The content in RepeatButtonCustom is entirely up to you. In addition, you can switch the background with additional properties in BackgroundSwitchElement:
Example:
1
<RepeatButtonHeight="30"Padding="10,0"Background="Black"Foreground="White"Content="This is a RepeatButton"Style="{StaticResource RepeatButtonCustom}"hc:BackgroundSwitchElement.MouseHoverBackground="Red"hc:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>