Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Font family for Entry control

$
0
0

Hi

i am new to xamarin forms. Trying to assign a custom font for Android mobile for entry and label controls. Please suggest how to proceed?

i tried following way

label.FontFamily = Device.OnPlatform (
iOS: "MarkerFelt-Thin"
Android: "Droid Sans Mono"
WinPhone: "Comic Sans MS"
);

But got following error

Severity Code Description Project File Line Suppression State
Warning CS0618 'Device.OnPlatform(T, T, T)' is obsolete: 'Use switch(RuntimePlatform) instead.' App1.Android, App1.iOS c:\users\vinaymohana\documents\visual studio 2017\Projects\App1\App1\App1\MainPage.xaml.cs 15 Active

Please suggest me on this.


Viewing all articles
Browse latest Browse all 89864

Trending Articles