View Issue Details

IDProjectCategoryView StatusLast Update
0001460NoesisGUIC# SDKpublic2019-06-21 14:01
Reporterai_enabledAssigned Tosfernandez 
Status assignedResolutionopen 
Product Version2.2.1 
Target VersionFixed in Version 
Summary0001460: Line height support for TextBox
DescriptionHi guys,
there is a known workaround to enable line height for TextBox. Alas, it doesn't work with NoesisGUI

Please let me know if there is any other workaround or you could make it work in the future versions.

TagsNo tags attached.




2019-05-06 10:41

manager   ~0005662

I verified that LineHeight property is applied to the TextBox, but I see that the caret (and selection) is also affected by that property and that is not correct, we will fix it.


2019-05-06 17:17

updater   ~0005663

Hmm, I cannot make it work in 2.2.2... still the same line height.
I'm using this style:

<Style x:Key="ChatTextBoxStyle" TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Padding" Value="2,0,2,3" />
        <Setter Property="FontFamily" Value="{StaticResource DefaultFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="12.5" />
        <Setter Property="TextBlock.LineHeight" Value="13" />
        <Setter Property="TextBlock.LineStackingStrategy" Value="BlockLineHeight" />
        <Setter Property="AcceptsReturn" Value="False" />
        <Setter Property="AcceptsTab" Value="True" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="{StaticResource ChatBrushFromCurrentPlayer}" />
        <Setter Property="Background" Value="{StaticResource ChatEntryBackground}" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="SelectionBrush" Value="{StaticResource BrushColor7}" />
        <Setter Property="CaretBrush" Value="{StaticResource BrushColor7}" />
        <Setter Property="SelectionOpacity" Value="0.5" />
        <Setter Property="ContextMenu">
                <!-- No context menu -->
                <ContextMenu IsEnabled="False" />
        <Setter Property="Template">
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <StackPanel Orientation="Vertical"
                                Background="{TemplateBinding Background}">
                        <Control Style="{StaticResource ControlHorizontalSeparator}"
                                 VerticalAlignment="Center" />
                        <Border BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Padding="{TemplateBinding Padding}">
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost" />


2019-05-08 13:26

manager   ~0005665

I found that LineStackingStrategy property was not inherited, so that setter didn't work. That made setting a line height smaller than the default one didn't affect the effective height of the line. It worked for bigger LineHeight values like 40, though.

Anyway, I fixed the inheritance problem in LineStackingStrategy and line height will work fine in next release.


2019-05-08 15:20

updater   ~0005666

Awesome! Thank you, Sergio!



2019-06-21 14:01

updater   ~0005757

Fixed in 2.2.3, thanks!
Please close this ticket.

Issue History

Date Modified Username Field Change
2019-05-04 19:43 ai_enabled New Issue
2019-05-06 10:39 sfernandez Assigned To => sfernandez
2019-05-06 10:39 sfernandez Status new => assigned
2019-05-06 10:41 sfernandez Note Added: 0005662
2019-05-06 17:17 ai_enabled Note Added: 0005663
2019-05-08 13:26 sfernandez Status assigned => feedback
2019-05-08 13:26 sfernandez Note Added: 0005665
2019-05-08 15:20 ai_enabled Note Added: 0005666
2019-05-08 15:20 ai_enabled Status feedback => assigned
2019-06-21 14:01 ai_enabled Note Added: 0005757