Remove binding in WPF using code

前端 未结 4 1044
小蘑菇
小蘑菇 2020-12-29 18:09

I would like to use databinding when displaying data in a TextBox. I\'m basically doing like:

 public void ShowRandomObject(IRandomObject randomObject) {
            


        
4条回答
  •  情歌与酒
    2020-12-29 18:33

    How about just

    txtName.Text = txtName.Text;
    

    You would have to set the value after clearing it anyways. This works in SL4 at least.

提交回复
热议问题