开发者

Windows Phone 7 Button Left-Top from Code

开发者 https://www.devze.com 2023-04-09 09:52 出处:网络
How can i use android style gravity, and gavityTop=20px, Left=30px in Windows Phone 开发者_开发知识库7?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消