1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
using System;
namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific
{
using FormsElement = Forms.Entry;
public static class Entry
{
public static readonly BindableProperty AdjustsFontSizeToFitWidthProperty =
BindableProperty.Create("AdjustsFontSizeToFitWidth", typeof(bool),
typeof(Entry), false);
public static bool GetAdjustsFontSizeToFitWidth(BindableObject element)
{
return (bool)element.GetValue(AdjustsFontSizeToFitWidthProperty);
}
public static void SetAdjustsFontSizeToFitWidth(BindableObject element, bool value)
{
element.SetValue(AdjustsFontSizeToFitWidthProperty, value);
}
public static bool AdjustsFontSizeToFitWidth(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
return GetAdjustsFontSizeToFitWidth(config.Element);
}
public static IPlatformElementConfiguration<iOS, FormsElement> SetAdjustsFontSizeToFitWidth(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value)
{
SetAdjustsFontSizeToFitWidth(config.Element, value);
return config;
}
public static IPlatformElementConfiguration<iOS, FormsElement> EnableAdjustsFontSizeToFitWidth(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
SetAdjustsFontSizeToFitWidth(config.Element, true);
return config;
}
public static IPlatformElementConfiguration<iOS, FormsElement> DisableAdjustsFontSizeToFitWidth(this IPlatformElementConfiguration<iOS, FormsElement> config)
{
SetAdjustsFontSizeToFitWidth(config.Element, false);
return config;
}
}
}
|