BoxViewは画面上に長方形を描画するためのコントロールです。
使用方法は簡単で、塗りつぶしの色をColorプロパティで、幅をWidthRequestsプロパティで、高さをHeigthRequestsプロパティで指定します。
以下にBoxViewの使用例を示します。
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:BoxViewSample" x:Class="BoxViewSample.MainPage"> <BoxView Color="Blue" WidthRequest="100" HeightRequest="200" VerticalOptions="Center" HorizontalOptions="Center" /> </ContentPage>
Please follow and like us:
コメント