单击按钮添加文本框 [英] Add a text box by a click of a button
本文介绍了单击按钮添加文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
单击按钮应在同一屏幕上添加一个文本框.如何执行此操作?
A click of a button should add a text box on the same screen.. How to do this ?
推荐答案
将以下代码添加到按钮的click事件.您应该会在表单中看到文本框.
Add the below code to the click event of the button . You should see the textbox in the form.
ContentPanel.Children.Add(new TextBox());
ContentPanel此处是Grid的名称.
ContentPanel here is the name of the Grid. 这篇关于单击按钮添加文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文