MadSeb
MadSeb

Reputation: 8254

WPF change left margin of textbox

I want to change the just the left margin of a WPF textbox via XAML:

This code obviously does not work :

<TextBox Margin.Left ="0"/>

What would be the correct code, does anyone here know ?

Regards, MadSeb

Upvotes: 17

Views: 17854

Answers (1)

Goblin
Goblin

Reputation: 8032

I can't see your code - but it would normally go like this:

<TextBox Margin="5 0 0 0"/>

First number is left, then top, then right and finally bottom margin.

Hope this helps!

Upvotes: 32

Related Questions