David
David

Reputation: 2029

Apply stroke to a TextBlock (Windows 8)

How do you apply stroke (outline around text) to a TextBlock in XAML in a Windows 8 store app (not WPF)?

A very similar question was asked in 2008, but the suggested solution from Apply stroke to a textblock in WPF and the referenced https://msdn.microsoft.com/en-us/library/ms745816.aspx only work on Windows Presentation Foundation (WPF) applications. The effect I am looking for is the same.

Thanks for your help!

Upvotes: 3

Views: 749

Answers (1)

Juan Pablo Garcia Coello
Juan Pablo Garcia Coello

Reputation: 3232

win2d text effects

I have successfully done it with Win2D effect http://expediteapps.com/blog/textblock-with-win2d-effects/

The idea is to apply two effects that create the outline effect. You can experiment with different ways and find the best combination you need. To add Win2D you can get it by nuget and is really easy to use.

and you do not need to convert the font to any strange glyphs.

Upvotes: 2

Related Questions