views:

27

answers:

0

I would like to be able to place the word "hello" centered on a specific point. I need to do this completely in XAML without extra code. Best I can tell, all the text alignment properties/styles in XAML act on text within some bounding canvas or other element.

Since I don't know the length of the text I want to center, I can't center it using my own code.

The reason I need to solve the problem entirely in XAML is that I'm not using WPF to create the XAML, I'm writing it directly to an XML DOM. It will then be loaded into a Silverlight or WPF control for display.

In most graphic languages, including SVG, which is where my code originated, text can be aligned against a "stationary point" without a bounding box.

Any suggestions appreciated