示例#1
0
    private void SetMyVM(WalletVM vm)
    {
        _myVM = vm;
        _myVM.ResetChanges();
        this.DataContext = _myVM;

        if (_myVM.SelectedItem == null)
        {
            txtTitle.Text          = "";
            txtContent.Buffer.Text = "";
        }
        else
        {
            txtTitle.Text          = _myVM.SelectedItem.Title;
            txtContent.Buffer.Text = _myVM.SelectedItem.Content;
        }

        updateTreeview();
    }
示例#2
0
 private void SetMyVM(WalletVM vm)
 {
     _myVM = vm;
     _myVM.ResetChanges();
     this.DataContext = _myVM;
 }