question

Jramos avatar image
0 Votes"
Jramos asked NicoZhu-MSFT commented

How to make AppBarButton have round corner with style

How to make AppBarButton have round corner with style. Apply style the AppBarButton does not come out with the cornerRadius and when I pulse the button is tilted when I click on the animation it comes out normal

212670-2022-06-19-3.png

windows-uwp
2022-06-19-3.png (163.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered NicoZhu-MSFT commented

Hello,
Welcome to Microsoft Q&A!

How to make AppBarButton have round corner with style

AppBarButton has CornerRadius property, you could give a available CornerRadius value for setting round corner for AppBarButton

 <Style TargetType="AppBarButton">
     <Setter Property="CornerRadius" Value="10"/>
 </Style>


Update

Please delete PointerDownThemeAnimation from PointerOver and Pressed VisualState, And add CornerRadius property for RootGrid

  <Grid x:Name="RootGrid" CornerRadius="{TemplateBinding CornerRadius}" >

Usage

  <AppBarButton CornerRadius="10"  Style="{StaticResource AppBarButtonCustomStyle}" Label="Test" Icon="Accept"/>

Thank you.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

i still Have the same problem.

0 Votes 0 ·

Please share more detail about AppBarButton style

0 Votes 0 ·

this is Link Github
README.md




0 Votes 0 ·
Show more comments