Centering the text of a label in XAML

K

K Viltersten

I'm playing around with the XAML-builder in VS2k8 and
it seems that

<Label Height="28" Margin="0,10,0,0" Name="label1"
VerticalAlignment="Top" TextBlock.TextAlignment="Center"></Label>

doesn't center the text mass in the label. What should
i do? There seems to be no effect on the text no matter
what alignment i choose.
 
K

K Viltersten

Den 2008-05-25 18:11:25 skrev K Viltersten said:
I'm playing around with the XAML-builder in VS2k8 and
it seems that

<Label Height="28" Margin="0,10,0,0" Name="label1"
VerticalAlignment="Top" TextBlock.TextAlignment="Center"></Label>

doesn't center the text mass in the label. What should
i do? There seems to be no effect on the text no matter
what alignment i choose.

In fact, as i'm laborating with the controls, i notice that
e.g. i can't find any property to change the text of the
label while running my application... There's no ".text".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top