You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the MainWindow.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
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to make a
TextBlock
be right aligned, where the text is always pinned to the right edge of theTextBlock
and as theTextBlock
is resized, trimming of theTextBlock
occurs on the left side.It sounds like
FlowDirection
ofRightToLeft
should be the property to set, along with settingTextReadingOrder
toUseFlowDirection
but this doesn't seem to work. TheTextBlock
still behaves the same waySteps to reproduce the bug
TextBlock
to theMainWindow.xaml
: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
The text was updated successfully, but these errors were encountered: