举例说明:动态添加一个TextBox到Grid中,并设置它的Margin:
TextBox text = new TextBox();
t_grid.Children.Add(text);
Thickness margin = new Thickness(left, top, right, bottom);
text.Margin = margin;
posted on 2011-12-23 16:59 共鸣 阅读(6873) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3