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
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
精彩评论