在Xamarin.Form中,我们可以这样定义界面的风格; <?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:ForStyle" x:Class="ForStyle.ForStylePage"> <StackLayout> <Button Text=" Carpe diem " HorizontalOptions="Center" VerticalOptions="CenterAndExpand" BorderWidth="3" TextColor="Red" FontSize="Large"/> <Button Text=" Sapere aude " HorizontalOptions="Center" VerticalOptions="CenterAndExpand" BorderWidth="3" TextColor="Red" FontSize="Large"/> <Button Text=" Discere faciendo " HorizontalOptions="Center" VerticalOptions="CenterAndExpand" BorderWidth="3" TextColor="Red" FontSize="Large"/> </StackLayout> </ContentPage> 下面是在Android平台和iOS平台的运行效果,至于WinPhone上的运行效果,我手头既没有WinPhone的真机也没有模拟器,就不给出……
阅读全文