maui-linux/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issu.../Bugzilla51427.cs

38 строки
845 B
C#

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using Xamarin.Forms;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 51427, "Custom Font Not Working Inside NavigationPage", PlatformAffected.UWP)]
public class Bugzilla51427 : TestNavigationPage
{
protected override void Init()
{
PushAsync(new TestFontPage());
}
}
class TestFontPage : ContentPage
{
public TestFontPage()
{
var label = new Label
{
Text = "This Label should be using a custom font.",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
FontSize = 24,
FontFamily = "Assets/Fonts/Lobster-Regular.ttf#Lobster"
};
Content = label;
}
}
}