Xamarin如何加邊框


方法1:兩個層,內層與外層用背景顏色差,padding設置邊框

<StackLayout BackgroundColor="White">
<StackLayout BackgroundColor="Black" Padding="1">
<Editor BackgroundColor="White" />
</StackLayout>
...
</StackLayout>

方法2:Frame 可以套在外面設置邊框也可以設置圓邊

1 <Frame Grid.Row="1" MinimumHeightRequest="200" BorderColor="Black" CornerRadius="20" HasShadow="True" BackgroundColor="#cfe2f3">
2 <StackLayout BackgroundColor="Transparent" VerticalOptions="FillAndExpand">
3 <radialView:RadialProgressView VerticalOptions="FillAndExpand" BindingContext="{Binding radialProgressViewModel}" />
4 <Label FontSize="Large" Text="實時數據" TextColor="#3399CC" VerticalOptions="End" HorizontalTextAlignment="Center"></Label>
5 </StackLayout>
6 </Frame>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM