BoxView显示特定颜色的矩形。API / 指南 |
<BoxView Color="Accent" WidthRequest="150" HeightRequest="150" HorizontalOptions="Center"> |
椭圆形显示省略号或圆圈。API / 指南 |
<Ellipse Fill="Red" WidthRequest="150" HeightRequest="50" HorizontalOptions="Center" /> |
映像显示位图。API / 指南 |
<Image Source="https://aka.ms/campus.jpg" Aspect="AspectFit" HorizontalOptions="Center" /> |
Label显示一行或多行文本。API / 指南 |
<Label Text="Hello, Xamarin.Forms!" FontSize="Large" FontAttributes="Italic" HorizontalTextAlignment="Center" /> |
线条显示一行。API / 指南 |
<Line X1="40" Y1="0" X2="0" Y2="120" Stroke="Red" HorizontalOptions="Center" /> |
映射显示地图。API / 指南 |
<maps:Map ItemsSource="{Binding Locations}" /> |
路径显示曲线和复杂形状。API / 指南 |
<Path Stroke="Black" Aspect="Uniform" HorizontalOptions="Center" HeightRequest="100" WidthRequest="100" Data="M13.9,16.2 L32,16.2 32,31.9 13.9,30.1Z M0,16.2 L11.9,16.2 11.9,29.9 0,28.6Z M11.9,2 L11.9,14.2 0,14.2 0,3.3Z M32,0 L32,14.2 13.9,14.2 13.9,1.8Z" /> |
多边形显示多边形。API / 指南 |
<Polygon Points="0 48, 0 144, 96 150, 100 0, 192 0, 192 96, 50 96, 48 192, 150 200 144 48" Fill="Blue" Stroke="Red" StrokeThickness="3" HorizontalOptions="Center" /> |
折线显示一系列相互连接的直线。API / 指南 |
<Polyline Points="0,0 10,30, 15,0 18,60 23,30 35,30 40,0 43,60 48,30 100,30" Stroke="Red" HorizontalOptions="Center" /> |
矩形显示矩形或正方形。API / 指南 |
<Rectangle Fill="Red" WidthRequest="150" HeightRequest="50" HorizontalOptions="Center" /> |
WebView显示网页或 HTML 内容。API / 指南 |
<WebView Source="https://learn.microsoft.com/xamarin/" VerticalOptions="FillAndExpand" /> |
|
|