Open
Description
Describe the bug
I'm trying to make a TextBlock
be right aligned, where the text is always pinned to the right edge of the TextBlock
and as the TextBlock
is resized, trimming of the TextBlock
occurs on the left side.
It sounds like FlowDirection
of RightToLeft
should be the property to set, along with setting TextReadingOrder
to UseFlowDirection
but this doesn't seem to work. The TextBlock
still behaves the same way
Steps to reproduce the bug
- Create a blank C# app
- Add this
TextBlock
to theMainWindow.xaml
:
<TextBlock Text="Hi there my name is Joe and this is long text which should stick to the right side and be truncated at the left" Width="300" TextAlignment="Right" TextReadingOrder="UseFlowDirection" FlowDirection="RightToLeft"/>
Expected behavior
The end of the TextBlock is visible "stick to the right side and be truncated at the left"
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003
Windows version
Windows 11 (24H2): Build 26100
Additional context
If there is a different way to accomplish this not through these APIs I'd be happy to do this