Kristof
Topic Author
Posts: 19
Joined: 22 Apr 2014, 14:44

How to use TextDecorations (such as underline)

19 May 2014, 13:11

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?
 
User avatar
sfernandez
Site Admin
Posts: 3250
Joined: 22 Dec 2011, 19:20

Re: How to use TextDecorations (such as underline)

20 May 2014, 11:54

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>
 
Kristof
Topic Author
Posts: 19
Joined: 22 Apr 2014, 14:44

Re: How to use TextDecorations (such as underline)

19 Jun 2014, 10:55

Thanks a lot. This workaround solves my problem.

Who is online

Users browsing this forum: No registered users and 2 guests