Reputation: 1092
as the title says, I would like to have a black font with a white border
in my TextBox
.
How could it be achieved?
Cheers.
Upvotes: 5
Views: 6580
Reputation: 1349
A full class and example using Geometries:
http://blogs.msdn.com/b/wpfsdk/archive/2006/12/24/using-text-as-a-decorative-graphic.aspx
Upvotes: 1
Reputation: 29153
Check out Blacklight controls @ http://blacklight.codeplex.com/. In particular look at the sample on http://mightymeaty.members.winisp.net/blacklight.silverlight/ | Visual Controls | TEXT | Stroke Text Block (Alpha).
Upvotes: 2
Reputation: 4076
What I always do for that is set the font color to white and set a DropShadow effect on the text.
Next, play around with depth, angle (set to 0 or something) and blur and you should be able to get what you want.
Upvotes: 3
Reputation: 204129
It's possible to convert text into geometry objects with advanced formatting like outlines and fills for individual letters - you can find out more about how to do that here.
Having said that, I'm not sure that this is possible inside a TextBox. It may be for read-only text (TextBlock) only.
Edit
This blog post shows some advanced font rendering techniques inside a TextBox. It may be handy for you.
Upvotes: 3