작동하지 않습니다 바인딩이 텍스트 상자 (tbCommand)에 문자열 (History.current_commad) 바인딩 내 데이터입니다 :WPF 데이터
history = new History();
Binding bind = new Binding("Command");
bind.Source = history;
bind.Mode = BindingMode.TwoWay;
bind.Path = new PropertyPath("current_command");
bind.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
// myDatetext is a TextBlock object that is the binding target object
tbCommand.SetBinding(TextBox.TextProperty, bind);
history.current_command = "test";
history.current_command은 변경되지만 텍스트 상자가 갱신되지 않는 . 뭐가 잘못 되었 니? current_command
그냥 필드이므로이 업데이트되면서 됐어요 때 Binding
알고하지 않기 때문에
감사
'History' 클래스는 어떤 모습입니까? – dlev
공용 클래스 기록 {public string current_command; } – Charlie