public async Task FontSize_Editor_UIBH()
{
/*TEST CODE*/
+
+ var size = 10;
+
+ if (Device.Idiom == TargetIdiom.TV)
+ {
+ size = size * 3;
+ }
+
_editor = new Editor
{
BackgroundColor = Color.Blue.WithLuminosity(0.9),
VerticalOptions = LayoutOptions.CenterAndExpand,
- HorizontalOptions = LayoutOptions.CenterAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
HeightRequest = 200,
- WidthRequest = 300,
Text = "Xamarin Forms"
};
String[] dataTest = { "", "", "" };
- dataTest[0] = "15.2";
- dataTest[1] = "25.3";
- dataTest[2] = "45.5";
+ dataTest[0] = size.ToString();
+ dataTest[1] = (size * 2).ToString();
+ dataTest[2] = (size * 3).ToString();
var text = "Select a FontSize test";
var title = "FontSize Test";
List<ControlTest> controlTest = new List<ControlTest>
ControlTest ctlTest = (ControlTest)e.Item;
if (ctlTest.Name.Equals(dataTest[0]))
{
- _editor.FontSize = 15.2;
+ _editor.FontSize = size;
}
else if (ctlTest.Name.Equals(dataTest[1]))
{
- _editor.FontSize = 25.3;
+ _editor.FontSize = size * 2;
}
else
{
- _editor.FontSize = 35.4;
+ _editor.FontSize = size * 3;
}
};
ContentPage page = new ContentPage