1: public interface INavigationService
2: {
3: /// <summary>
4: /// Gets a value indicating whether it is possible to navigate back.
5: /// </summary>
6: /// <value>
7: /// <c>true</c> if it is possible to navigate back; otherwise, <c>false</c>.
8: /// </value>
9: bool CanGoBack { get; }
10:
11: /// <summary>
12: /// Gets a value indicating whether it is possible to navigate forward.
13: /// </summary>
14: /// <value>
15: /// <c>true</c> if it is possible to navigate backforward otherwise, <c>false</c>.
16: /// </value>
17: bool CanGoForward { get; }
18:
19: /// <summary>
20: /// Navigates back to the previous page.
21: /// </summary>
22: void GoBack();
23:
24: /// <summary>
25: /// Navigates forward to the next page.
26: /// </summary>
27: void GoForward();
28:
29: /// <summary>
30: /// Navigates to a specific location.
31: /// </summary>
32: void Navigate(string uri);
33:
34: /// <summary>
35: /// Navigates to a specific location.
36: /// </summary>
37: /// <param name="uri">The URI.</param>
38: /// <param name="parameters">Dictionary of parameters, where the key is the name of the parameter,
39: /// and the value is the value of the parameter.</param>
40: void Navigate(string uri, Dictionary<string, object> parameters);
41:
42: /// <summary>
43: /// Navigates to a specific location.
44: /// </summary>
45: void Navigate(Uri uri);
46:
47: /// <summary>
48: /// Navigates the specified location registered using the view model type.
49: /// </summary>
50: /// <typeparam name="TViewModelType">The view model type.</typeparam>
51: void Navigate<TViewModelType>();
52:
53: /// <summary>
54: /// Navigates the specified location registered using the view model type.
55: /// </summary>
56: /// <typeparam name="TViewModelType">The view model type.</typeparam>
57: /// <param name="parameters">Dictionary of parameters, where the key is the name of the parameter,
58: /// and the value is the value of the parameter.</param>
59: void Navigate<TViewModelType>(Dictionary<string, object> parameters);
60:
61: /// <summary>
62: /// Navigates the specified location registered using the view model type.
63: /// </summary>
64: /// <param name="viewModelType">The view model type.</param>
65: void Navigate(Type viewModelType);
66:
67: /// <summary>
68: /// Navigates the specified location registered using the view model type.
69: /// </summary>
70: /// <param name="viewModelType">The view model type.</param>
71: /// <param name="parameters">Dictionary of parameters, where the key is the name of the parameter,
72: /// and the value is the value of the parameter.</param>
73: void Navigate(Type viewModelType, Dictionary<string, object> parameters);
74:
75: /// <summary>
76: /// Registers the specified view model and the page type. This way, Catel knowns what
77: /// page to show when a specific view model page is requested.
78: /// </summary>
79: /// <param name="viewModelType">Type of the view model.</param>
80: /// <param name="pageType">Type of the page.</param>
81: /// <exception cref="ArgumentException">when <paramref name="viewModelType"/> does not implement <see cref="IViewModel"/>.</exception>
82: /// <exception cref="ArgumentException">when <paramref name="pageType"/> is not of type <see cref="PhoneApplicationPage"/>.</exception>
83: void Register(Type viewModelType, Type pageType);
84:
85: /// <summary>
86: /// Registers the specified view model and the page type. This way, Catel knowns what
87: /// page to show when a specific view model page is requested.
88: /// </summary>
89: /// <param name="name">Name of the registered page.</param>
90: /// <param name="pageType">Type of the page.</param>
91: /// <exception cref="ArgumentException">when <paramref name="name"/> is <c>null</c> or empty.</exception>
92: /// <exception cref="ArgumentException">when <paramref name="pageType"/> is not of type <see cref="PhoneApplicationPage"/>.</exception>
93: void Register(string name, Type pageType);
94:
95: /// <summary>
96: /// This unregisters the specified view model.
97: /// </summary>
98: /// <param name="viewModelType">Type of the view model to unregister.</param>
99: /// <returns>
100: /// <c>true</c> if the view model is unregistered; otherwise <c>false</c>.
101: /// </returns>
102: bool Unregister(Type viewModelType);
103:
104: /// <summary>
105: /// This unregisters the specified view model.
106: /// </summary>
107: /// <param name="name">Name of the registered page.</param>
108: /// <returns>
109: /// <c>true</c> if the view model is unregistered; otherwise <c>false</c>.
110: /// </returns>
111: bool Unregister(string name);
112: }