Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IUiService.cs
1using System.Collections.ObjectModel;
2using System.Diagnostics.CodeAnalysis;
3using Mopups.Pages;
6
8{
12 [DefaultImplementation(typeof(UiService))]
13 public interface IUiService : ILoadableService
14 {
15 #region DisplayAlert
16
25 Task<bool> DisplayAlert(string Title, string Message, string? Accept = null, string? Cancel = null);
26
32 Task DisplayException(Exception Exception, string? Title = null);
33
34 #endregion
35
36 #region DisplayPrompt
37
46 Task<string?> DisplayPrompt(string Title, string Message, string? Accept, string? Cancel);
47
48 #endregion
49
50 #region Screen shots
51
56 Task<ImageSource?> TakeScreenshotAsync();
57
62 Task<ImageSource?> TakeBlurredScreenshotAsync();
63
64 #endregion
65
66 #region Navigation
67
74 Task GoToAsync(string Route, BackMethod BackMethod = BackMethod.Inherited, string? UniqueId = null);
75
83 Task GoToAsync<TArgs>(string Route, TArgs? Args, BackMethod BackMethod = BackMethod.Inherited, string? UniqueId = null) where TArgs : NavigationArgs, new();
84
89 Task GoBackAsync(bool Animate = true);
90
96 TArgs? PopLatestArgs<TArgs>()
97 where TArgs : NavigationArgs, new();
98
104 TArgs? TryGetArgs<TArgs>(string? UniqueId = null)
105 where TArgs : NavigationArgs, new();
106
112 bool TryGetArgs<TArgs>([NotNullWhen(true)] out TArgs? Args, string? UniqueId = null)
113 where TArgs : NavigationArgs, new();
114
118 Page CurrentPage { get; }
119
120 #endregion
121
122 #region Popups
123
127 public ReadOnlyCollection<PopupPage?> PopupStack { get; }
128
135 where TViewModel : BasePopupViewModel, new()
136 where TPage : BasePopup, new();
137
145 Task PushAsync<TPage, TViewModel>(TPage page, TViewModel viewModel)
146 where TViewModel : BasePopupViewModel
147 where TPage : BasePopup;
148
155 Task PushAsync<TPage, TViewModel>(TPage page)
156 where TViewModel : BasePopupViewModel, new()
157 where TPage : BasePopup;
158
165 Task PushAsync<TPage, TViewModel>(TViewModel viewModel)
166 where TViewModel : BasePopupViewModel
167 where TPage : BasePopup, new();
168
173 Task PushAsync<TPage>()
174 where TPage : BasePopup, new();
175
180 Task PushAsync<TPage>(TPage page)
181 where TPage : BasePopup;
182
190 Task<TReturn?> PushAsync<TPage, TViewModel, TReturn>()
191 where TViewModel : ReturningPopupViewModel<TReturn>, new()
192 where TPage : BasePopup, new();
193
203 Task<TReturn?> PushAsync<TPage, TViewModel, TReturn>(TPage page, TViewModel viewModel)
204 where TViewModel : ReturningPopupViewModel<TReturn>
205 where TPage : BasePopup;
206
215 Task<TReturn?> PushAsync<TPage, TViewModel, TReturn>(TPage page)
216 where TViewModel : ReturningPopupViewModel<TReturn>, new()
217 where TPage : BasePopup;
218
227 Task<TReturn?> PushAsync<TPage, TViewModel, TReturn>(TViewModel viewModel)
228 where TViewModel : ReturningPopupViewModel<TReturn>
229 where TPage : BasePopup, new();
230
234 Task PopAsync();
235
236 #endregion
237
238 #region Images
244 public Task<ImageSource?> ConvertSvgUriToImageSource(string svgUri);
245
246 #endregion
247 }
248}
An base class holding page specific navigation parameters.
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...
Service serializing and managing UI-related tasks.
Definition: IUiService.cs:14
Task< string?> DisplayPrompt(string Title, string Message, string? Accept, string? Cancel)
Prompts the user for some input.
Task PushAsync< TPage, TViewModel >()
Pushes a popup onto the current view
Task PopAsync()
Closes the current popup.
Task DisplayException(Exception Exception, string? Title=null)
Displays an alert/message box to the user.
Task< ImageSource?> TakeBlurredScreenshotAsync()
Takes a blurred screen shot
Task GoToAsync(string Route, BackMethod BackMethod=BackMethod.Inherited, string? UniqueId=null)
Navigates the AppShell to the specified route, with page arguments to match.
Task< ImageSource?> TakeScreenshotAsync()
Takes a screen-shot.
Task GoBackAsync(bool Animate=true)
Returns to the previous page/route.
ReadOnlyCollection< PopupPage?> PopupStack
The current stack of popup pages.
Definition: IUiService.cs:127
Task GoToAsync< TArgs >(string Route, TArgs? Args, BackMethod BackMethod=BackMethod.Inherited, string? UniqueId=null)
Navigates the AppShell to the specified route, with page arguments to match.
Task< ImageSource?> ConvertSvgUriToImageSource(string svgUri)
Fetches a SVG and converts it to a PNG image source.
Task< bool > DisplayAlert(string Title, string Message, string? Accept=null, string? Cancel=null)
Displays an alert/message box to the user.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7