MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

BorderThickness causing TextBox size change

Open
#2,235 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug evaluation required
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

When a value is set for BorderThickness, the TextBox changes its size when the mouse is over.

If I remove BorderThickness and leave the default value for the style, this problem does not occur.

I noticed the same behavior using DropShadowEffect, if you define an Effect the same problem happens.

Tested code:

<TextBox Style="{StaticResource MaterialDesignOutlinedTextBox}" BorderThickness="1" Padding="2,0,0,0" Background="Black" Foreground="White" materialDesign:HintAssist.IsFloating="False" materialDesign:HintAssist.Hint="Test" HorizontalAlignment="Left" VerticalAlignment="Top" Width="150" Height="30" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Margin="49,31,0,0"/>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the provided TextBox using the MaterialDesignOutlinedTextBox style, BorderThickness, and the hover state. Compare it with the default BorderThickness case and the DropShadowEffect case; done means the TextBox keeps the same size when the mouse is over it in both scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
design, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.