举例说明:动态添加一个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 共鸣 阅读(6837) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 共鸣 Powered by .NET 9.0 on Kubernetes