开发者

Set text of a control of a child-window in WPF

开发者 https://www.devze.com 2022-12-19 17:37 出处:网络
How can i set a text of a textblock of a c开发者_运维问答hild window. childWindowname.textblockName.Text = \"\" doesn\'t have any effect.Odd.I have used Text from codebehind to change the text in my w

How can i set a text of a textblock of a c开发者_运维问答hild window. childWindowname.textblockName.Text = "" doesn't have any effect.


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.

public void SetTextBlockMessage(string message)
{
  textblockname.Text = message;
}
0

精彩评论

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