Hello,
I create a <Style x:Key="MyBorderStyle" TargetType="Border">
, set <Setter Property="StrokeShape" Value="RoundRectangle 2,2,2,2"/>
in the Styles.xaml and set Style="{StaticResource MyBorderStyle}"
in the Border‘s Style. But this Border
will disappear when I debug it in emulator. If I change some property then hot reload executed, Border
appears.
This issue is filed in the Maui GitHub Page: https://github.com/dotnet/maui/issues/7744 You have left a comment, please waitting for PG’s update.
Before this issue fixed, you can use <Frame>
to replace of <Border>
, and I create a global style in the Styles.xaml
and set <Setter Property="CornerRadius" Value="2"/>
, it worked as normal.
https://video2.skills-academy.com/en-us/dotnet/maui/user-interface/controls/frame
Best Regards,
Leon Lu
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.