New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Entry and Editor to use Windows 11 styles #3444
Merged
Merged
Conversation
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
# Conflicts: # src/Controls/samples/Controls.Sample/Pages/Controls/EditorPage.xaml # src/Core/src/Platform/Windows/TextBoxExtensions.cs
This is because some controls cannot be inherited - ie: PasswordBox
2 tasks
Redth
approved these changes
Nov 22, 2021
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area/controls 🎮
Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor
control-editor
control-entry
Editor, Entry, SearchBar
control-frame
platform/android 🤖
platform/iOS 🍎
platform/windows 🪟
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Just like with #3363, this PR updates the Entry and Editor to be fully Windows 11 styled!
I moved all the properties that affect the TextBox into the extension methods and implemented all the functionality from the outside. This will allow us to reuse basically all the logic with PasswordBox.
The
MauiTextBoxhas been renamed toMauiSearchTextBoxand I have created a smallerMauiPasswordTextBoxwith just theIsPasswordandPassword. The EntryHandler by default uses theMauiPasswordTextBox, and in a new PR I will make a newPasswordEntrycontrol and use the OSPasswordBox.Entry & PasswordEntry
On most platforms (ie: iOS and ANdroid) the "password-ness" of the control is just some flag that can be set or unset. On Windows (and potentially other platforms), the password control is an entirely new control and independent. It may even have fewer features.
As a result, we need to split the controls in the cross-platform layer to not only gain the OS features, but also make implementation easier. For platforms that use the same control, this is really easy as they can use all the same extension methods.
Additions made
MauiTextBoxtoMauiSearchTextBoxfor temporary use inSearchBarMauiPasswordTextBoxthat emulates the old functionality of IsPassword.PR Checklist
Does this PR touch anything that might affect accessibility?
If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.
Pictures