views:

65

answers:

1

The binding works great, but as soon as I bind to to an field of type int, the field no longer gets alignet to the right?

<TextBlock 
 TextAlignment="Right"
 Width="50"
 Text="{Binding SomeIntField}">
</TextBlock>
A: 

yes, as soon as I use test="10" it gets right-aligned correctly. thats why I suppose it has to be something with the field type int?

what other code is needed? I thought this would be the minmal code to reproduce the behaviour.

wpf.Binding
I cannot reproduce this problem in Blend. You do not have the `Width` set to `Auto`, do you?! It really is fixed to 50?! And you really set the `TextAlignment` property, not the `HorizontalAlignment` property?! If so, please post additional code: the XAML around this TextBlock (the StackPanel), maybe other XAML as well. Plus the code of the property you are binding to. Otherwise, noone will be able to help you because the code that you posted is absolutely valid and makes the text right-aligned, no matter what the `Text` property is bound to.
gehho