【发布时间】:2016-12-06 13:23:11
【问题描述】:
我想通过一个按钮单击循环中的 .xaml.cs 文件(可能),在 xaml 文件中创建文本框。我已经计算了每个文本框出现在面板中的边距,但不知道如何绑定代码。 Here's the image of the xaml design view and what I'm trying to achieve. The window will have one textbox for choices appear and the loop will create another and another each time the add choice button is clicked.
有人可以帮忙吗?我只是在学习wpf。谢谢
【问题讨论】:
-
绑定代码是什么意思?推荐一本书Applications = Code + Markup
-
@LeiYang 我的意思是 .xaml.cs 文件中的代码应该在 .xaml 文件中创建相应的操作
-
那你有什么尝试
-
已搜索但找不到任何关于从 cs 代码创建新组件的信息。老实说,不知道如何去做。任何提示或示例或任何内容都会有所帮助
-
@LeiYang 您提供的链接不是完整的书。一定要买吗?
标签: c# wpf visual-studio xaml