meirrav
meirrav

Reputation: 771

Padding property wpf - padding to the right only

I'm trying to use the padding property for a buttons Content, I want the padding the be done to the right (10px the the right) but when I use the padding prperty in my xaml like this :

Padding="0,0,10,0" 

the text is on the left side of the button(close to the left border).

How can I padd to the right?

Thanks

Upvotes: 0

Views: 897

Answers (2)

Danilo Vulović
Danilo Vulović

Reputation: 3063

<Button ... Padding="0 0 10 0" HorizontalContentAlignment="Right" />

Upvotes: 1

Mikl&#243;s Balogh
Mikl&#243;s Balogh

Reputation: 2202

This the correct behaviour. Padding puts space between your content and to your container.

The numbers go clokwise, starting at the left side.

If you want to see the text closer to the right border use Padding="10,0,0,0"

Upvotes: 0

Related Questions