我试图传递CommandParameter给我的方法ViewModel.这该怎么做?
private void Open(object sender)
{
if (sender==this.objMainWindow.btnHistory)
{
objMainWindow.Container.Child = objHistory;
}
if (sender == this.objMainWindow.btnNew_Item)
{
objMainWindow.Container.Child = objNewItem;
}
if (sender == this.objMainWindow.btnSide_Effects)
{
objMainWindow.Container.Child = objSideEffect;
}
}
Run Code Online (Sandbox Code Playgroud)
这是我ViewModel想要通过的meyhod CommandParameter.我CommandParameter用于按钮.