Skip to content
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

Margin and Padding of HelperText don't match the specs #2633

Closed
ElieTaillard opened this issue Apr 1, 2022 · 4 comments
Closed

Margin and Padding of HelperText don't match the specs #2633

ElieTaillard opened this issue Apr 1, 2022 · 4 comments
Labels
Milestone

Comments

@ElieTaillard
Copy link
Member

Margin and Padding of HelperText don't match the specs.
The HelperText should be aligned with the Text.
This correction have to be made on :

  • FilledPassword
  • FilledDatePicker
  • FilledCombobox
  • OutlinedPassword
  • OutlinedDatePicker
  • OutlinedCombobox

I have already fixed the problem for most of the styles by taking the example of this PR : #2217
You can check my changes here : ElieTaillard@eca7a83
I just need to fix the problem for the FilledCombobox, but a trigger is missing in MaterialDesignTheme.ComboBox.xaml for the property wpf:TextFieldAssist.HasFilledTextField

Should I add this trigger in the template?

@Keboo
Copy link
Member

Keboo commented Apr 3, 2022

Yes I am good simply adding in that trigger.

@ElieTaillard
Copy link
Member Author

ElieTaillard commented Apr 11, 2022

I tried to add

<Trigger Property="wpf:TextFieldAssist.HasFilledTextField" Value="True">
      <Setter Property="Padding" Value="16 8 12 8" />
      <Setter TargetName="HelperTextWrapper" Property="Margin" Value="16 0 0 0" />
</Trigger>

in the <ControlTemplate.Triggers> tag, but it doesn't change the padding and margin of the HelperText for the FilledCombobox
image

Do I have to change anything in the code behind to make it work?

@Keboo Keboo added the bug label Apr 15, 2022
@Keboo
Copy link
Member

Keboo commented Apr 15, 2022

So a few things need to be changed for that trigger to work:

  1. Make sure the trigger is being applied in the triggers section of the MaterialDesignFloatingHintComboBoxTemplate control template.
  2. Make sure to give the Canvas around the help text the name "HelperTextWrapper"
  3. In the MaterialDesignFilledComboBox style set the TextFieldAssist.HasFilledTextField attached property to true (was a little surprised this was missing).

@Keboo Keboo added this to the 4.5.0 milestone Apr 15, 2022
@ElieTaillard
Copy link
Member Author

ElieTaillard commented Apr 15, 2022

Thank you, this setter was missing <Setter Property="wpf:TextFieldAssist.HasFilledTextField" Value="True"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants