diff options
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
2 files changed, 57 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43516.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43516.cs new file mode 100644 index 00000000..615f5a09 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43516.cs @@ -0,0 +1,56 @@ +using System; + +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls.Issues +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 43516, "Changing FontAttributes on a label to None changes its font size")] + public class Bugzill43516 : TestContentPage + { + protected override void Init() + { + var label = new Label + { + FontAttributes = FontAttributes.Bold + }; + label.BindingContext = label; + label.SetBinding(Label.TextProperty, "FontAttributes"); + + Content = new StackLayout + { + Children = + { + label, + new Button + { + Text = "Click to set FontAttributes.None", + Command = new Command(() => + { + label.FontAttributes = FontAttributes.None; + }) + }, + new Button + { + Text = "Click to set FontAttributes.Bold", + Command = new Command(() => + { + label.FontAttributes = FontAttributes.Bold; + }) + }, + new Button + { + Text = "Click to set Font.SystemFontOfSize to NamedSize.Medium", + Command = new Command(() => label.FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))) + } + } + }; + } + } +} diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index c0f5d33a..adf173df 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -123,6 +123,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla42329.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla42364.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla42519.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla43516.cs" /> <Compile Include="$(MSBuildThisFileDirectory)CarouselAsync.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34561.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla34727.cs" /> |