Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 8743 - now using specific style in SearchBar [UWP] (#8773)
* Adding a test page for Issue 8743. * Correcting UITestCategory * Renaming AutoSuggestStyle.xaml -> FormsAutoSuggestBoxStyle.xaml; adding x:Key to AutoSuggestBox-style. * Applying style to AutoSuggestBox in SearchNarRenderer - fixing 8743 * Removing comment about default style - as style is no longer default * Fixing typo in class name for Issue8743 (was erroneously Issue8843, might create conflict) * Making GlyphElement in FormsCancelButton template use TemplateBinding for FontSize instead of fixed 12 pts. * Updating nuspec to include FormsAutoSuggestBoxStyle instead of AutoSuggestStyle fixes #8743
- Loading branch information
1 parent
de3ca13
commit 6fab987
Showing
6 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue8743.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Text; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 8743, "[Bug][UWP] SearchBar does not respect FontSize on 4.3.0", | ||
PlatformAffected.UWP)] | ||
#if UITEST | ||
[NUnit.Framework.Category(UITestCategories.SearchBar)] | ||
#endif | ||
public class Issue8743 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
Title = "Issue 8743"; | ||
|
||
StackLayout layout = new StackLayout(); | ||
|
||
Label instructions = new Label | ||
{ | ||
Text = "Check that the font size in the search bars below matches the size specified in the placeholders." | ||
}; | ||
|
||
SearchBar normalSearchBar = new SearchBar | ||
{ | ||
Placeholder = "FontSize = default" | ||
}; | ||
|
||
SearchBar largeSearchBar = new SearchBar | ||
{ | ||
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(SearchBar)), | ||
Placeholder = "FontSize = Large" | ||
}; | ||
|
||
SearchBar size100SearchBar = new SearchBar | ||
{ | ||
FontSize = 100f, | ||
Placeholder = "FontSize = 100.0" | ||
}; | ||
|
||
layout.Children.Add(instructions); | ||
layout.Children.Add(normalSearchBar); | ||
layout.Children.Add(largeSearchBar); | ||
layout.Children.Add(size100SearchBar); | ||
|
||
Content = layout; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters