MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Setting HorizontalContentAlignment to Right/Center on a MaterialDesignFloatingHintTextBox leads to shifting Hint during text entry

Open MCBTay opened this issue 7 years ago • 1 comments

Below is a short example illustrating the issue. As long as your Text is shorter than your Hint, all is well. But when your Text exceeds your Hint, the Hint begins shifting to stay with the start of the text. I've also provided a screenshot.

image

<TextBox 
	Style="{StaticResource MaterialDesignFloatingHintTextBox}"
	materialDesign:HintAssist.Hint="Some Hint Text"
	HorizontalContentAlignment="Right"
	Text="Short" />

<TextBox 
	Style="{StaticResource MaterialDesignFloatingHintTextBox}"
	materialDesign:HintAssist.Hint="Some Hint Text"
	HorizontalContentAlignment="Right"
	Text="Longer, more verbose text" />

MCBTay avatar Jun 07 '18 20:06 MCBTay

I think you should use FlowDirection="RightToLeft" instead of HorizontalContentAlignment="Right".

image

Is this what you are looking for?

ElieTaillard avatar May 28 '22 21:05 ElieTaillard