Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Smart hint and text box style refactor (#3486)
* Initial TextBox style changes added * Temporarily fix AutoSuggestBox by bringing in old converters directly in style * Add character counter toggle to demo app (cherry picked from commit 555d6f9979cb32e004ceb02a716d8fe11ec3d601) (cherry picked from commit 3b61edd) * Basics of SmartHint refactor in place - edge cases need attention * Fix "padding" issues for outlined style by letting the padding animate from 0 to desired size * Fix AcceptsReturn=True scenario for TextBox use of SmartHint * Smart hint page in demo app handles its own scrolling * Improve handling of dynamic FontSize changes * Add TextFieldAssist.IconVerticalAlignment AP to control icon placement in TextBox elements * Add APs for controlling prefix/suffix visibility and floating hint alignment behavior * DP cleanup * Smart Hint demo app page cleanup * Let hint span accross prefix/suffix texts * Update demo app Smart Hint page with selectors for new APs * Make prefix/suffix visibility converter respect new AP * Decent working state; special cases where hint should also animate horizontally not covered yet * Fix horizontal animation of hint cases * Mark converters for obsoletion/deletion * Remove no longer used converter * Move SmartHint converters into their own files * Temporarily change startup page to SmartHint * Fix FloatingHintInitialHorizontalOffsetConverter logic * Update MainDemo.Wpf/SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Update MainDemo.Wpf/SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Update MainDemo.Wpf/SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Update MainDemo.Wpf/SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Update MainDemo.Wpf/SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Update MaterialDesignThemes.Wpf/Converters/FloatingHintMarginConverter.cs Co-authored-by: Kevin B <[email protected]> * Renamed converter values * Update MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.SmartHint.xaml Co-authored-by: Kevin B <[email protected]> * Implement BooleanToDashStyleConverter.ConvertBack() * Remove dead code * Handle HasErrors=True margin correction * Fix support for TextFieldAssist.NewSpecHighlightingEnabled=True * Add TextFieldAssist.NewSpecHighlightingEnabled support on demo app SmartHint page * Add options to control scroll bar visibility on SmartHint demo page (for TextBox variants) * Slightly nicer layout for scroll bar options on SmartHint demo page * Fix "accepts return" check box to use VM binding * Temporarily add defaults to showcase the horizontal scrollbar issue * Include RD for missing static resource * PoC fix for the VerticalContentAlignment=Stretch issue * Fix demo app layout and defaults after rebase * Leverage list pattern matching in relevant converters * Cleanup constants and "hide" temporary constants in an internal class. * Fix for TextBoxTests.FilledTextBox_ValidationErrorMargin_MatchesHelperTextMargin() * Fix for TextBoxTests.HelperText_CanSetFontColorWithAttachedStyle() * Fix for TextBoxTests.OnClearButtonShown_ControlHeightDoesNotChange() * Deleted TextBoxTests.OnOutlinedTextBox_FloatingHintOffsetWithinRange() as it is no longer relevant * Fix for TextBoxTests.OnTextBoxDisabled_FloatingHintBackgroundIsOpaque() * Fix for TextBoxTests.OutlinedTextBox_ValidationErrorMargin_MatchesHelperTextMargin() * Fix for TextBoxTests.TextBox_MultiLineAndFixedHeight_RespectsVerticalContentAlignment() * Adjust default paddings to for better looks, and temporary make the UI tests comparing control heights pass. * Merge duplicate triggers * Add dedicated "MaterialDesign.Brush.TextBox.HoverBorder" brush * Use new hover brush for the filled TextBox style * Minor code cleanup * New brush is now an alternate rather than an obsolete brush * Fix issue with HintAssist.IsFloating wrongfully affecting the hint text placement * Cherry-pick FloatingHintMarginConverter from ComboBox branch * Add additional binding to use of FloatingHintMarginConverter * Add IsEditable parameter to prefix/suffix converter (taken from ComboBox branch) * Split failing default height tests into pre- and post-smarthint-refactor * Fix jumpy UI when validation errors and color hint text red * Set MinHeight=16 and separate all tests into pre-/post-refactor * Remove MaxWidth from demo app page --------- Co-authored-by: Kevin B <[email protected]> Co-authored-by: Kevin Bost <[email protected]>
- Loading branch information