Page 1 of 1

How to use TextDecorations (such as underline)

Posted: 19 May 2014, 13:11
by Kristof
Hi,

I want to underline a TextBlock. In WPF this is done using the TextDecorations property. In Noesis I see that this property exists, but if I try to set it from XAML then I get this error:
Parsing TextBlock.TextDecorations (@48,6).
'Underline' is not a valid value for property 'TextBlock.TextDecorations'
This is the XAML:
<TextBlock Text="FORGOT PASSWORD?" TextDecorations="Underline"/>
Am I doing something wrong or is this not (yet) supported? If so, when can we expect it?

Re: How to use TextDecorations (such as underline)

Posted: 20 May 2014, 11:54
by sfernandez
TextDecorations are not supported yet. If you are really interested in this feature, please open a ticket in our bugtracker to follow its status.

Meanwhile, if your scenario is simple, you can always simulate the underline by drawing a line under the text yourself.
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
    <TextBlock Text="FORGOT PASSWORD?" Foreground="Black"/>
    <Rectangle Fill="Black" Height="1" VerticalAlignment="Bottom" Margin="0,0,0,1"/>
</Grid>

Re: How to use TextDecorations (such as underline)

Posted: 19 Jun 2014, 10:55
by Kristof
Thanks a lot. This workaround solves my problem.