lacas
lacas

Reputation: 14077

Windows Phone 7 Button Left-Top from Code

How can i use android style gravity, and gavityTop=20px, Left=30px in Windows Phone 7?

        Button btn = new Button() { 
            Content="newbutton "+i, 
            Margin=new Thickness(20)
        };

id like something to control my button's left/top margin from the top/left

Upvotes: 0

Views: 231

Answers (1)

Johannes
Johannes

Reputation: 36

If I understood you right, you want something like this:

HorizontalAlignment = HoriztontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Thickness(30,20,0,0),//left 30, top 20, right 0, bottom 0

P.S.: untested, maybe including typos. don't have a SDK on this PC

Upvotes: 1

Related Questions