Skip to content

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

Closed

Description

@ElieTaillard

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?

Activity

  1. Keboo commented on Apr 3, 2022

    @Keboo
    Member

    Yes I am good simply adding in that trigger.

  2. ElieTaillard commented on Apr 11, 2022

    @ElieTaillard
    CollaboratorAuthor

    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?

  3. Keboo commented on Apr 15, 2022

    @Keboo
    Member

    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).
  4. added this to the 4.5.0 milestone on Apr 15, 2022
  5. ElieTaillard commented on Apr 15, 2022

    @ElieTaillard
    CollaboratorAuthor

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

  6. added a commit that references this issue on Feb 4, 2024
    b8fba1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions