public DialogViewModel(UserControl content, DialogButtonModel button1, DialogButtonModel button2 = null, DialogButtonModel button3 = null) { DialogContent = content; Button1Command = button1.ButtonCommand; Button1Content = button1.Content; IsButton1Default = button1.IsDefault; IsButton1Cancel = button1.IsCancel; if (button2 != null) { Button2Command = button2.ButtonCommand; Button2Content = button2.Content; IsButton2Default = button2.IsDefault; IsButton2Cancel = button2.IsCancel; } else { IsButton2Visible = false; } if (button3 != null) { Button3Command = button3.ButtonCommand; Button3Content = button3.Content; IsButton3Default = button3.IsDefault; IsButton3Cancel = button3.IsCancel; } else { IsButton3Visible = false; } }
public IViewComponentResult Invoke(DialogButtonModel model) { return(View(model)); }