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 have a similar with ContentPresenter and TextAlignment.
I am using TextAlignment="Center" in a TemplatedControl.
The control display well in designer, but when the control is used in the real app, in a view that is already visible on screen. The texts are empty.
Designer:
App:
If I resize the window so that Measure of the control is called, or if I change view and get back (e.g. in a tab control), the display is now correct
Same issue with TextAlignment="Right", but no problem with Left.
Avalonia 11.0.1 beta 2
You can repro using the Theme of the HeaderedContentControl and adding TextAlignement="Center" for the ContentPresenter.
Another example of the issue with TextAlignment=Center: (no issue with HorizontalAlignment=Center)
I can use HorizontalAlignment instead of TextAlignement at the moment, but centering is not exactly the same. HorizontalAlignment is not perfectly centered, and don't work on multilines.
And another issue with text: not sure if it is the same bug or not but sometime the end of the text is not visible in ToolTips.
I display Bounds in a ToolTip:
I am using Segoe UI font in Windows 11 (scale 100%) with 11.1 RC1.
FontSize=12 but I got issue with all Font Sizes with TextAlignment.
And another issue with text: not sure if it is the same bug or not but sometime the end of the text is not visible in ToolTips.
That seems unrelated, the text is simply too long for the remaining space.
You could use a TextWrapping value of WrapWithOverflow or increase the width of the ToolTip.
Describe the bug
Consider the following text box which has 3 lines, one of them in Hebrew, a right-to-left language:
The TextBox incorrectly measures a width of 0:
(It has some width in the screenshot above due to padding, disable with
Padding="0"
)To Reproduce
Use the XML provided above.
Expected behavior
The TextBox should have the same width as it has when
TextAlignment
is set toLeft
:Avalonia version
11.0.10
OS
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: