Exemple #1
0
 public AddUrlView(HomeViewModel homeViewModel)
 {
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     InitializeComponent();
     var addUrlViewModel = new AddUrlViewModel(homeViewModel);
     DataContext = addUrlViewModel;
     addUrlViewModel.Closing += (s, e) => Close();
 }
 public ActionResult Add(AddUrlViewModel userInput)
 {
     if (ModelState.IsValid)
     {
         // store the data
         // ...
         //return RedirectToAction("Index", "Home");
         return(View(userInput));
     }
     return(View());
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddUrlContent"/> class.
 /// </summary>
 /// <param name="addUrlViewModel">The model view.</param>
 public AddUrlContent(AddUrlViewModel addUrlViewModel)
 {
     DataContext = addUrlViewModel;
 }