2
안녕하세요 @UI를 표시하는 기기를 기반으로 글꼴 크기를 변경하는 방법을 알고 계신 분.Xamarin 양식 - 기기 당 글꼴 크기 변경 iPhone/iPad
// iPhone 5
if (UIScreen.MainScreen.Bounds.Height == 568)
FontSize = 12
else
24pixles on IPad
즉 나는 스타일 속성을 사용하고 있습니다.
그러나 당신은 OnIdiom
을 사용할 수 있습니다 대형은 여전히 아이 패드
<Style x:Key="lblDetailValueHighlighted" TargetType="Label">
<Setter Property="TextColor" Value="Blue" />
<Setter Property="FontSize">
<Setter.Value>
<OnPlatform x:TypeArguments="NamedSize" iOS="Large" Android="Large" WinPhone="Medium" />
</Setter.Value>
</Setter>
<Setter Property="Margin" Value="3,1,3,3" />
</Style>