Closed GID0317 closed 3 months ago
Hi, according to WinUI guidelines, when the box is foucsed, the BorderThickness will be set to a different value called TextControlBorderThemeThicknessFocused
. If you want to remove the focused border, you can do as follows:
<RichTextBox BorderThickness="0">
<FrameworkElement.Resources>
<Thickness x:Key="{x:Static ui:ThemeKeys.TextControlBorderThemeThicknessFocusedKey}">0</Thickness>
</FrameworkElement.Resources>
</RichTextBox>
This will be mentioned in the future documentation.
Thanks! can’t wait to see it in the documentation. I’ll close this issue as completed.
Hi, the doc is done, please view https://docs.inkore.net/ui-wpf-modern/features/overrides/override-resources
@GID0317
Thank you! I'll check it out
Describe the bug I encountered an issue with the RichTextBox control in the library. When setting the BorderThickness property to 0, the border is still visible, and the focus underline appears. This behavior is inconsistent with the TextBox control, where setting BorderThickness to 0 successfully hides the border and focus underline.
To Reproduce Steps to reproduce the behavior:
Expected behavior RichTextBox should not display any border or focus underline when BorderThickness is set to 0 and BorderBrush is set to Transparent.
Screenshots
Additional context The RichTextBox still displays a border and focus underline despite setting BorderThickness to 0 and BorderBrush to Transparent.