From ba74c9f69bfbe1d1a477a3ffa069edada0343b62 Mon Sep 17 00:00:00 2001 From: Kevin Bost Date: Fri, 3 Jan 2025 00:10:42 -0800 Subject: [PATCH 1/6] Explicitly setting the token for the version number changes to use Bumping versions to 5.2.1 --- .github/workflows/get_versions.yml | 6 +++--- .github/workflows/release.yml | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/get_versions.yml b/.github/workflows/get_versions.yml index 337509a1ca..85eed9fd22 100644 --- a/.github/workflows/get_versions.yml +++ b/.github/workflows/get_versions.yml @@ -23,9 +23,9 @@ jobs: getting_versions: env: #Update these base version numbers - mdix-version: "5.2.0" - mdix-colors-version: "5.2.0" - mdix-mahapps-version: "5.2.0" + mdix-version: "5.2.1" + mdix-colors-version: "5.2.1" + mdix-mahapps-version: "5.2.1" name: Set version numbers runs-on: ubuntu-latest defaults: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc53f460ed..6e15959652 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -313,6 +313,8 @@ jobs: Update-Version -Prefix "mdix-mahapps-version" - name: Open Pull Request + env: + GITHUB_TOKEN: ${{ secrets.SA_PAT }} run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" From 3cb7dc9d210132b525017cab9be650605082ce2f Mon Sep 17 00:00:00 2001 From: Corvin <43533385+corvinsz@users.noreply.github.com> Date: Sun, 5 Jan 2025 09:58:01 +0100 Subject: [PATCH 2/6] base the Filled and Outline style of NumericControls on the actual Base-Styles, not the concrete (style-)implementations (#3757) --- .../Themes/MaterialDesignTheme.NumericUpDown.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml index 79eca21e7c..b5ee39eaa7 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.NumericUpDown.xaml @@ -184,7 +184,7 @@ + + + + + + + diff --git a/src/MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml b/src/MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml index 797348de8b..f1bb219680 100644 --- a/src/MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml +++ b/src/MaterialDesign3.Demo.Wpf/MenusAndToolBars.xaml @@ -8,7 +8,10 @@ d:DesignHeight="300" d:DesignWidth="300" mc:Ignorable="d"> - + + + + @@ -57,6 +60,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The menu height matches with the parent panel height. Use the splitter to see the adaptive menu in action. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -178,28 +346,51 @@ - + + + + - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MaterialDesignThemes.Wpf/MenuAssist.cs b/src/MaterialDesignThemes.Wpf/MenuAssist.cs index d64952c876..1f6a5e7930 100644 --- a/src/MaterialDesignThemes.Wpf/MenuAssist.cs +++ b/src/MaterialDesignThemes.Wpf/MenuAssist.cs @@ -1,5 +1,3 @@ -using System.Windows.Media; - namespace MaterialDesignThemes.Wpf; public static class MenuAssist @@ -14,4 +12,15 @@ public static readonly DependencyProperty TopLevelMenuItemHeightProperty public static double GetTopLevelMenuItemHeight(DependencyObject element) => (double)element.GetValue(TopLevelMenuItemHeightProperty); public static void SetTopLevelMenuItemHeight(DependencyObject element, double value) => element.SetValue(TopLevelMenuItemHeightProperty, value); #endregion + + public static readonly DependencyProperty MenuItemsPresenterMarginProperty = + DependencyProperty.RegisterAttached( + "MenuItemsPresenterMargin", + typeof(Thickness), + typeof(MenuAssist), + new FrameworkPropertyMetadata(new Thickness(0, 16, 0, 16), FrameworkPropertyMetadataOptions.Inherits)); + public static Thickness GetMenuItemsPresenterMargin(DependencyObject obj) + => (Thickness)obj.GetValue(MenuItemsPresenterMarginProperty); + public static void SetMenuItemsPresenterMargin(DependencyObject obj, Thickness value) + => obj.SetValue(MenuItemsPresenterMarginProperty, value); } diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Menu.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Menu.xaml index 21b71ad276..ec889970af 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Menu.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Menu.xaml @@ -1,4 +1,4 @@ - @@ -186,7 +186,7 @@ Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" wpf:ScrollViewerAssist.IgnorePadding="{Binding Path=(wpf:ScrollViewerAssist.IgnorePadding), RelativeSource={RelativeSource TemplatedParent}}" wpf:ScrollViewerAssist.PaddingMode="{Binding Path=(wpf:ScrollViewerAssist.PaddingMode), RelativeSource={RelativeSource TemplatedParent}}"> - + - + Date: Thu, 9 Jan 2025 19:52:36 +0100 Subject: [PATCH 4/6] added AutoSuggestBox to MD2&3 FieldsLineUp demo (#3763) * added AutoSuggestBox to MD2 FieldsLineUp demo * added AutoSuggestBox to MD3 FieldsLineUp demo --- src/MainDemo.Wpf/FieldsLineUp.xaml | 16 ++++++++++++++++ src/MainDemo.Wpf/FieldsLineUp.xaml.cs | 3 +++ src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml | 16 ++++++++++++++++ .../FieldsLineUp.xaml.cs | 3 +++ 4 files changed, 38 insertions(+) diff --git a/src/MainDemo.Wpf/FieldsLineUp.xaml b/src/MainDemo.Wpf/FieldsLineUp.xaml index d8d82fb829..cc16ac9768 100644 --- a/src/MainDemo.Wpf/FieldsLineUp.xaml +++ b/src/MainDemo.Wpf/FieldsLineUp.xaml @@ -159,6 +159,7 @@ + + + + + + + diff --git a/src/MainDemo.Wpf/FieldsLineUp.xaml.cs b/src/MainDemo.Wpf/FieldsLineUp.xaml.cs index 97ea7a074b..5ad4bcacac 100644 --- a/src/MainDemo.Wpf/FieldsLineUp.xaml.cs +++ b/src/MainDemo.Wpf/FieldsLineUp.xaml.cs @@ -73,6 +73,9 @@ private static void SetValue(Control control) { switch (control) { + case MaterialDesignThemes.Wpf.AutoSuggestBox autoSuggestBox: + autoSuggestBox.Text = nameof(MaterialDesignThemes.Wpf.AutoSuggestBox.Text); + break; case TextBox textBox: textBox.Text = nameof(TextBox.Text); break; diff --git a/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml b/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml index c9c36351c5..ed90c7fa03 100644 --- a/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml +++ b/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml @@ -148,6 +148,7 @@ + + + + + + + diff --git a/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs b/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs index 052b836e39..84dfec9f58 100644 --- a/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs +++ b/src/MaterialDesign3.Demo.Wpf/FieldsLineUp.xaml.cs @@ -73,6 +73,9 @@ private static void SetValue(Control control) { switch (control) { + case MaterialDesignThemes.Wpf.AutoSuggestBox autoSuggestBox: + autoSuggestBox.Text = nameof(MaterialDesignThemes.Wpf.AutoSuggestBox.Text); + break; case TextBox textBox: textBox.Text = nameof(TextBox.Text); break; From 9e71c5c27e06a4f9b6d523b4fe7b1bb9b3cddfe1 Mon Sep 17 00:00:00 2001 From: Corvin <43533385+corvinsz@users.noreply.github.com> Date: Fri, 10 Jan 2025 06:08:05 +0100 Subject: [PATCH 5/6] Added Attached Property "TextFieldAssist.ClearButtonSize" (#3754) * Cleanup of launchSettings and Cards Page in Demo * Revert "Cleanup of launchSettings and Cards Page in Demo" This reverts commit ede38d4cb72c73549d6675009ec07a36fba0fe7d. * added AP TextFieldAssist.ClearButtonSize to control the size of the ClearButton * apply TextFieldAssist.ClearButtonSize on the Button rather than the PackIcon * apply TextFieldAssist.ClearButtonSize on the Button rather than the PackIcon --------- Co-authored-by: Corvin Szimion --- .../TextFieldAssist.cs | 26 ++++++++++++++----- .../MaterialDesignTheme.AutoSuggestBox.xaml | 21 +++++++++------ .../Themes/MaterialDesignTheme.ComboBox.xaml | 9 +++++-- .../MaterialDesignTheme.DatePicker.xaml | 1 + .../MaterialDesignTheme.PasswordBox.xaml | 18 ++++++++++--- .../Themes/MaterialDesignTheme.TextBox.xaml | 9 +++++-- 6 files changed, 61 insertions(+), 23 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/TextFieldAssist.cs b/src/MaterialDesignThemes.Wpf/TextFieldAssist.cs index 3fa0a3b856..aac1a63024 100644 --- a/src/MaterialDesignThemes.Wpf/TextFieldAssist.cs +++ b/src/MaterialDesignThemes.Wpf/TextFieldAssist.cs @@ -41,7 +41,7 @@ public static class TextFieldAssist public static void SetTextBoxViewVerticalAlignment(DependencyObject element, VerticalAlignment value) => element.SetValue(TextBoxViewVerticalAlignmentProperty, value); - public static VerticalAlignment GetTextBoxViewVerticalAlignment(DependencyObject element) => (VerticalAlignment) element.GetValue(TextBoxViewVerticalAlignmentProperty); + public static VerticalAlignment GetTextBoxViewVerticalAlignment(DependencyObject element) => (VerticalAlignment)element.GetValue(TextBoxViewVerticalAlignmentProperty); /// /// Controls the visibility of the underline decoration. @@ -172,7 +172,7 @@ public static void SetSuffixTextVisibility(DependencyObject element, PrefixSuffi => element.SetValue(SuffixTextVisibilityProperty, value); public static PrefixSuffixVisibility GetSuffixTextVisibility(DependencyObject element) - => (PrefixSuffixVisibility) element.GetValue(SuffixTextVisibilityProperty); + => (PrefixSuffixVisibility)element.GetValue(SuffixTextVisibilityProperty); /// /// SuffixTextHintBehavior dependency property. Controls how a floating hint aligns with respect to the text and suffix. @@ -184,7 +184,7 @@ public static void SetSuffixTextHintBehavior(DependencyObject element, PrefixSuf => element.SetValue(SuffixTextHintBehaviorProperty, value); public static PrefixSuffixHintBehavior GetSuffixTextHintBehavior(DependencyObject element) - => (PrefixSuffixHintBehavior) element.GetValue(SuffixTextHintBehaviorProperty); + => (PrefixSuffixHintBehavior)element.GetValue(SuffixTextHintBehaviorProperty); /// /// PrefixText dependency property @@ -208,7 +208,7 @@ public static void SetPrefixTextVisibility(DependencyObject element, PrefixSuffi => element.SetValue(PrefixTextVisibilityProperty, value); public static PrefixSuffixVisibility GetPrefixTextVisibility(DependencyObject element) - => (PrefixSuffixVisibility) element.GetValue(PrefixTextVisibilityProperty); + => (PrefixSuffixVisibility)element.GetValue(PrefixTextVisibilityProperty); /// /// PrefixTextHintBehavior dependency property. Controls how a floating hint aligns with respect to the text and prefix. @@ -234,6 +234,18 @@ public static void SetHasClearButton(DependencyObject element, bool value) public static bool GetHasClearButton(DependencyObject element) => (bool)element.GetValue(HasClearButtonProperty); + /// + /// Controls the size of the clear button. + /// + public static readonly DependencyProperty ClearButtonSizeProperty = DependencyProperty.RegisterAttached( + "ClearButtonSize", typeof(double), typeof(TextFieldAssist), new PropertyMetadata(16.0d)); + + public static void SetClearButtonSize(DependencyObject element, double value) + => element.SetValue(ClearButtonSizeProperty, value); + + public static double GetClearButtonSize(DependencyObject element) + => (double)element.GetValue(ClearButtonSizeProperty); + /// /// Controls visibility of the leading icon /// @@ -316,7 +328,7 @@ public static void SetIconVerticalAlignment(DependencyObject element, VerticalAl => element.SetValue(IconVerticalAlignmentProperty, value); public static VerticalAlignment GetIconVerticalAlignment(DependencyObject element) - => (VerticalAlignment) element.GetValue(IconVerticalAlignmentProperty); + => (VerticalAlignment)element.GetValue(IconVerticalAlignmentProperty); public static Style GetCharacterCounterStyle(DependencyObject obj) => (Style)obj.GetValue(CharacterCounterStyleProperty); @@ -373,14 +385,14 @@ public static Thickness GetOutlinedBorderActiveThickness(DependencyObject elemen public static void SetTextBoxLineCount(DependencyObject element, int value) => element.SetValue(TextBoxLineCountProperty, value); public static int GetTextBoxLineCount(DependencyObject element) - => (int) element.GetValue(TextBoxLineCountProperty); + => (int)element.GetValue(TextBoxLineCountProperty); public static readonly DependencyProperty TextBoxIsMultiLineProperty = DependencyProperty.RegisterAttached( "TextBoxIsMultiLine", typeof(bool), typeof(TextFieldAssist), new PropertyMetadata(false)); public static void SetTextBoxIsMultiLine(DependencyObject element, bool value) => element.SetValue(TextBoxIsMultiLineProperty, value); public static bool GetTextBoxIsMultiLine(DependencyObject element) - => (bool) element.GetValue(TextBoxIsMultiLineProperty); + => (bool)element.GetValue(TextBoxIsMultiLineProperty); #region Methods diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml index ce94fdb964..a8f8f1123f 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml @@ -227,20 +227,25 @@ Visibility="{TemplateBinding wpf:TextFieldAssist.HasTrailingIcon, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}" /> diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml index bd56d8c73e..7e0a333041 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml @@ -470,7 +470,8 @@ diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml index c742868407..dd3e686ef0 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.DatePicker.xaml @@ -71,6 +71,7 @@ wpf:TextFieldAssist.TrailingIconSize="{TemplateBinding wpf:TextFieldAssist.TrailingIconSize}" wpf:TextFieldAssist.DecorationVisibility="{TemplateBinding wpf:TextFieldAssist.DecorationVisibility}" wpf:TextFieldAssist.HasClearButton="{TemplateBinding wpf:TextFieldAssist.HasClearButton}" + wpf:TextFieldAssist.ClearButtonSize="{TemplateBinding wpf:TextFieldAssist.ClearButtonSize}" wpf:TextFieldAssist.HasFilledTextField="{TemplateBinding wpf:TextFieldAssist.HasFilledTextField}" wpf:TextFieldAssist.HasOutlinedTextField="{TemplateBinding wpf:TextFieldAssist.HasOutlinedTextField}" wpf:TextFieldAssist.NewSpecHighlightingEnabled="{TemplateBinding wpf:TextFieldAssist.NewSpecHighlightingEnabled}" diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml index 38365c2cfc..ff3b415b4f 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml @@ -271,7 +271,8 @@ @@ -898,7 +903,8 @@ diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml index 1093037f9b..a20c25196a 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml @@ -266,7 +266,8 @@ From 070e8bb9fea6e396e372f44f37a5a84adf06439d Mon Sep 17 00:00:00 2001 From: Nicolai Henriksen Date: Fri, 10 Jan 2025 07:38:08 +0100 Subject: [PATCH 6/6] [SmartHint] Hint placement for "readonly" controls (#3764) * Demo app workaround/hack for initial miscalculation of hint placement * Ensure ComboBox smart hint behaves according to MD spec According to the "Behavior" section of the "Menus" page in the link below, the hint should float even when there is no selection, but the popup is open. https://m2.material.io/components/menus#exposed-dropdown-menu * Fix hint positioning issue when "readonly" element The issue was present for all controls once they are in "readonly" state. Special handling of the case where the element is readonly, and the hint should follow the prefix/suffix needed to be added because of the "business rule" that prefix/suffix is always visible when the element is "readonly". * Fixing so the hack is no longer needed * Fix AutoSuggestBox as well --------- Co-authored-by: Kevin Bost --- ...ingHintInitialHorizontalOffsetConverter.cs | 13 ++- src/MaterialDesignThemes.Wpf/SmartHint.cs | 2 +- .../MaterialDesignTheme.AutoSuggestBox.xaml | 106 +++++++++--------- .../Themes/MaterialDesignTheme.ComboBox.xaml | 1 + .../MaterialDesignTheme.PasswordBox.xaml | 2 + .../Themes/MaterialDesignTheme.TextBox.xaml | 37 +++--- 6 files changed, 86 insertions(+), 75 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/Converters/FloatingHintInitialHorizontalOffsetConverter.cs b/src/MaterialDesignThemes.Wpf/Converters/FloatingHintInitialHorizontalOffsetConverter.cs index bb1d5a4c88..c9bf535f65 100644 --- a/src/MaterialDesignThemes.Wpf/Converters/FloatingHintInitialHorizontalOffsetConverter.cs +++ b/src/MaterialDesignThemes.Wpf/Converters/FloatingHintInitialHorizontalOffsetConverter.cs @@ -19,7 +19,8 @@ public class FloatingHintInitialHorizontalOffsetConverter : IMultiValueConverter PrefixSuffixVisibility suffixVisibility, PrefixSuffixHintBehavior prefixHintBehavior, PrefixSuffixHintBehavior suffixHintBehavior, - HorizontalAlignment horizontalContentAlignment + HorizontalAlignment horizontalContentAlignment, + bool isEditable, ]) { return 0; @@ -37,8 +38,11 @@ double GetLeftOffset() return prefixVisibility switch { PrefixSuffixVisibility.WhenFocusedOrNonEmpty - when prefixHintBehavior == PrefixSuffixHintBehavior.AlignWithText => + when prefixHintBehavior == PrefixSuffixHintBehavior.AlignWithText && isEditable => prefixWidth + prefixMargin.Right, + PrefixSuffixVisibility.WhenFocusedOrNonEmpty + when prefixHintBehavior == PrefixSuffixHintBehavior.AlignWithPrefixSuffix && !isEditable => + -(prefixWidth + prefixMargin.Right), PrefixSuffixVisibility.Always when prefixHintBehavior == PrefixSuffixHintBehavior.AlignWithPrefixSuffix => -(prefixWidth + prefixMargin.Right), @@ -51,8 +55,11 @@ double GetRightOffset() return suffixVisibility switch { PrefixSuffixVisibility.WhenFocusedOrNonEmpty - when suffixHintBehavior == PrefixSuffixHintBehavior.AlignWithText => + when suffixHintBehavior == PrefixSuffixHintBehavior.AlignWithText && isEditable => -(suffixWidth + suffixMargin.Left), + PrefixSuffixVisibility.WhenFocusedOrNonEmpty + when suffixHintBehavior == PrefixSuffixHintBehavior.AlignWithPrefixSuffix && !isEditable => + suffixWidth + suffixMargin.Left, PrefixSuffixVisibility.Always when suffixHintBehavior == PrefixSuffixHintBehavior.AlignWithPrefixSuffix => suffixWidth + suffixMargin.Left, diff --git a/src/MaterialDesignThemes.Wpf/SmartHint.cs b/src/MaterialDesignThemes.Wpf/SmartHint.cs index c69eba8aac..41c8245531 100644 --- a/src/MaterialDesignThemes.Wpf/SmartHint.cs +++ b/src/MaterialDesignThemes.Wpf/SmartHint.cs @@ -258,7 +258,7 @@ private void RefreshState(bool useTransitions) string state = string.Empty; bool isEmpty = proxy.IsEmpty(); - bool isFocused = proxy.IsFocused(); + bool isFocused = HintHost?.IsKeyboardFocusWithin ?? proxy.IsFocused(); if (UseFloating) state = !isEmpty || isFocused ? HintFloatingPositionName : HintRestingPositionName; diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml index a8f8f1123f..ece9dd79f4 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.AutoSuggestBox.xaml @@ -71,29 +71,29 @@ + VerticalAlignment="Stretch" + Background="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" + CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" + RenderTransformOrigin="0.5,0.5" + Visibility="{TemplateBinding wpf:TextFieldAssist.RippleOnFocusEnabled, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}"> + Padding="{TemplateBinding Padding}" + wpf:BottomDashedLineAdorner.Brush="{TemplateBinding BorderBrush}" + wpf:BottomDashedLineAdorner.Thickness="{Binding RelativeSource={RelativeSource Self}, Path=BorderThickness}" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" + SnapsToDevicePixels="True"> + MinHeight="16" + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> @@ -104,32 +104,14 @@ - - - - - - - - - - - - + Grid.Column="0" + Width="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" + Height="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" + Margin="0,0,6,0" + VerticalAlignment="{TemplateBinding wpf:TextFieldAssist.IconVerticalAlignment}" + Kind="{TemplateBinding wpf:TextFieldAssist.LeadingIcon}" + Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" + Visibility="{TemplateBinding wpf:TextFieldAssist.HasLeadingIcon, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}" /> + @@ -191,20 +174,38 @@ + Background="{TemplateBinding wpf:HintAssist.Background}" + CornerRadius="2"> + + + + + + + + + + + + + Grid.Column="3" + Margin="2,0,0,0" + VerticalAlignment="Center" + FontSize="{TemplateBinding FontSize}" + Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" + Text="{TemplateBinding wpf:TextFieldAssist.SuffixText}"> @@ -288,11 +289,10 @@ CornerRadius="{TemplateBinding wpf:TextFieldAssist.UnderlineCornerRadius}" Visibility="{TemplateBinding wpf:TextFieldAssist.DecorationVisibility}" /> - + + Padding="{TemplateBinding Padding, Converter={StaticResource HelperTextMarginConverter}}" + Width="{Binding ActualWidth, ElementName=OuterBorder}"> diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml index 7e0a333041..7b8c0f0fbf 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml @@ -416,6 +416,7 @@ + diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml index ff3b415b4f..d6745207d8 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PasswordBox.xaml @@ -216,6 +216,7 @@ + @@ -836,6 +837,7 @@ + diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml index a20c25196a..52372c0272 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.TextBox.xaml @@ -151,24 +151,6 @@ Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" Visibility="{TemplateBinding wpf:TextFieldAssist.HasLeadingIcon, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}" /> - - - - - - - - - - - - + @@ -236,6 +219,24 @@ + + + + + + + + + + + +