Exemplo n.º 1
0
 public void ShouldSetResetHistory()
 {
     var result = new PageResult("MyWindow", null, new ViewEngineCollection()).ClearNavigationHistory();
     Assert.AreEqual(true, result.Options["ResetNavigationHistory"]);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Navigates using the current navigation service to a page with the specified name. For example,
 /// if the page name is "CustomerDetails", it will try to resolve and navigate to a WPF page named
 /// CustomerDetails, CustomerDetailsPage, CustomerDetailsView, and other combinations (see the
 /// <see cref="PageViewEngine"/> for details).
 /// </summary>
 /// <param name="viewName">Name of the view.</param>
 /// <param name="model">The model.</param>
 /// <returns>A <see cref="PageResult"/>.</returns>
 public virtual PageResult Page(string viewName, object model)
 {
     var result = new PageResult(viewName, model, ViewEngines);
     return result;
 }
Exemplo n.º 3
0
 public void ShouldSetViewTypeToPage()
 {
     var result = new PageResult("MyWindow", false, new ViewEngineCollection());
     Assert.AreEqual("Page", result.Options["ViewType"]);
 }