在 WPF 中设置子窗口控件的文本
如何设置子窗口文本块的文本。 childWindowname.textblockName.Text = "" 没有任何效果。
How can i set a text of a textblock of a child window. childWindowname.textblockName.Text = "" doesn't have any effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
奇怪的。我已经使用代码隐藏中的文本来更改窗口中的文本,没有任何问题。唯一的区别是我在子窗口中有一个我调用的公共方法,并且设置了 textblockname.Text。
例如
Odd. I have used Text from codebehind to change the text in my window without any problems. The only difference is that I had a public method in my child window that I called, and that set textblockname.Text.
e.g.