开发者

How do I dynamiclly define this button?

How do I define this in C# code so it is created at runt开发者_StackOverflow中文版ime?

<Button Canvas.Left="100" Canvas.Top="380" Content="Answer" Height="23" Name="submit_btn" Width="75" Click="submit_btn_Click" />


var b = new Button { Text = "Hello World", Left = 100, Top = 100, Width = 50, Height = 25 };
Controls.Add(b);

Place in constructor after InitializeComponent().

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜