日期:2014-05-17 浏览次数:21179 次
private void button1_Click(object sender, RoutedEventArgs e)
{
BindingExpression bindingExpression = textbox1.GetBindingExpression(TextBox.TextProperty);
bindingExpression.UpdateSource();
}
private RelayCommand myCommand;
public ICommand MyCommand
{
get
{
return this.myCommand?? (this.myCommand= new RelayCommand(
() =>
{
//点击事件的方法
}
));
}
}
其实VM是V的DataContext