().ToList();
109 | }
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/UsingValidation/UsingValidation.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace UsingValidation.UWP
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 | #if DEBUG
44 | if (System.Diagnostics.Debugger.IsAttached)
45 | {
46 | this.DebugSettings.EnableFrameRateCounter = true;
47 | }
48 | #endif
49 |
50 | Frame rootFrame = Window.Current.Content as Frame;
51 |
52 | // Do not repeat app initialization when the Window already has content,
53 | // just ensure that the window is active
54 | if (rootFrame == null)
55 | {
56 | // Create a Frame to act as the navigation context and navigate to the first page
57 | rootFrame = new Frame();
58 |
59 | rootFrame.NavigationFailed += OnNavigationFailed;
60 |
61 | Xamarin.Forms.Forms.Init(e);
62 |
63 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
64 | {
65 | //TODO: Load state from previously suspended application
66 | }
67 |
68 | // Place the frame in the current Window
69 | Window.Current.Content = rootFrame;
70 | }
71 |
72 | if (rootFrame.Content == null)
73 | {
74 | // When the navigation stack isn't restored navigate to the first page,
75 | // configuring the new page by passing required information as a navigation
76 | // parameter
77 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
78 | }
79 | // Ensure the current window is active
80 | Window.Current.Activate();
81 | }
82 |
83 | ///
84 | /// Invoked when Navigation to a certain page fails
85 | ///
86 | /// The Frame which failed navigation
87 | /// Details about the navigation failure
88 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
89 | {
90 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
91 | }
92 |
93 | ///
94 | /// Invoked when application execution is being suspended. Application state is saved
95 | /// without knowing whether the application will be terminated or resumed with the contents
96 | /// of memory still intact.
97 | ///
98 | /// The source of the suspend request.
99 | /// Details about the suspend request.
100 | private void OnSuspending(object sender, SuspendingEventArgs e)
101 | {
102 | var deferral = e.SuspendingOperation.GetDeferral();
103 | //TODO: Save application state and stop any background activity
104 | deferral.Complete();
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 |
24 | # Visual Studio 2015 cache/options directory
25 | .vs/
26 | # Uncomment if you have tasks that create the project's static files in wwwroot
27 | #wwwroot/
28 |
29 | # MSTest test Results
30 | [Tt]est[Rr]esult*/
31 | [Bb]uild[Ll]og.*
32 |
33 | # NUNIT
34 | *.VisualState.xml
35 | TestResult.xml
36 |
37 | # Build Results of an ATL Project
38 | [Dd]ebugPS/
39 | [Rr]eleasePS/
40 | dlldata.c
41 |
42 | # DNX
43 | project.lock.json
44 | artifacts/
45 |
46 | *_i.c
47 | *_p.c
48 | *_i.h
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.tmp_proj
63 | *.log
64 | *.vspscc
65 | *.vssscc
66 | .builds
67 | *.pidb
68 | *.svclog
69 | *.scc
70 |
71 | # Chutzpah Test files
72 | _Chutzpah*
73 |
74 | # Visual C++ cache files
75 | ipch/
76 | *.aps
77 | *.ncb
78 | *.opendb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 |
83 | # Visual Studio profiler
84 | *.psess
85 | *.vsp
86 | *.vspx
87 | *.sap
88 |
89 | # TFS 2012 Local Workspace
90 | $tf/
91 |
92 | # Guidance Automation Toolkit
93 | *.gpState
94 |
95 | # ReSharper is a .NET coding add-in
96 | _ReSharper*/
97 | *.[Rr]e[Ss]harper
98 | *.DotSettings.user
99 |
100 | # JustCode is a .NET coding add-in
101 | .JustCode
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | _NCrunch_*
111 | .*crunch*.local.xml
112 | nCrunchTemp_*
113 |
114 | # MightyMoose
115 | *.mm.*
116 | AutoTest.Net/
117 |
118 | # Web workbench (sass)
119 | .sass-cache/
120 |
121 | # Installshield output folder
122 | [Ee]xpress/
123 |
124 | # DocProject is a documentation generator add-in
125 | DocProject/buildhelp/
126 | DocProject/Help/*.HxT
127 | DocProject/Help/*.HxC
128 | DocProject/Help/*.hhc
129 | DocProject/Help/*.hhk
130 | DocProject/Help/*.hhp
131 | DocProject/Help/Html2
132 | DocProject/Help/html
133 |
134 | # Click-Once directory
135 | publish/
136 |
137 | # Publish Web Output
138 | *.[Pp]ublish.xml
139 | *.azurePubxml
140 | # TODO: Comment the next line if you want to checkin your web deploy settings
141 | # but database connection strings (with potential passwords) will be unencrypted
142 | *.pubxml
143 | *.publishproj
144 |
145 | # NuGet Packages
146 | *.nupkg
147 | # The packages folder can be ignored because of Package Restore
148 | **/packages/*
149 | # except build/, which is used as an MSBuild target.
150 | !**/packages/build/
151 | # Uncomment if necessary however generally it will be regenerated when needed
152 | #!**/packages/repositories.config
153 | # NuGet v3's project.json files produces more ignoreable files
154 | *.nuget.props
155 | *.nuget.targets
156 |
157 | # Microsoft Azure Build Output
158 | csx/
159 | *.build.csdef
160 |
161 | # Microsoft Azure Emulator
162 | ecf/
163 | rcf/
164 |
165 | # Microsoft Azure ApplicationInsights config file
166 | ApplicationInsights.config
167 |
168 | # Windows Store app package directory
169 | AppPackages/
170 | BundleArtifacts/
171 |
172 | # Visual Studio cache files
173 | # files ending in .cache can be ignored
174 | *.[Cc]ache
175 | # but keep track of directories ending in .cache
176 | !*.[Cc]ache/
177 |
178 | # Others
179 | ClientBin/
180 | ~$*
181 | *~
182 | *.dbmdl
183 | *.dbproj.schemaview
184 | *.publishsettings
185 | node_modules/
186 | orleans.codegen.cs
187 |
188 | # RIA/Silverlight projects
189 | Generated_Code/
190 |
191 | # Backup & report files from converting an old project file
192 | # to a newer Visual Studio version. Backup files are not needed,
193 | # because we have git ;-)
194 | _UpgradeReport_Files/
195 | Backup*/
196 | UpgradeLog*.XML
197 | UpgradeLog*.htm
198 |
199 | # SQL Server files
200 | *.mdf
201 | *.ldf
202 |
203 | # Business Intelligence projects
204 | *.rdl.data
205 | *.bim.layout
206 | *.bim_*.settings
207 |
208 | # Microsoft Fakes
209 | FakesAssemblies/
210 |
211 | # GhostDoc plugin setting file
212 | *.GhostDoc.xml
213 |
214 | # Node.js Tools for Visual Studio
215 | .ntvs_analysis.dat
216 |
217 | # Visual Studio 6 build log
218 | *.plg
219 |
220 | # Visual Studio 6 workspace options file
221 | *.opt
222 |
223 | # Visual Studio LightSwitch build output
224 | **/*.HTMLClient/GeneratedArtifacts
225 | **/*.DesktopClient/GeneratedArtifacts
226 | **/*.DesktopClient/ModelManifest.xml
227 | **/*.Server/GeneratedArtifacts
228 | **/*.Server/ModelManifest.xml
229 | _Pvt_Extensions
230 |
231 | # Paket dependency manager
232 | .paket/paket.exe
233 |
234 | # FAKE - F# Make
235 | .fake/
236 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/UAP10.0/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/MonoTouch1.0/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/Windows8.1/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/MonoAndroid1.0/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/WindowsPhone8.0/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/Xamarin.iOS1.0/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/WindowsPhoneApp8.1/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/packages/Prism.Unity.Forms.6.2.0/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/Prism.Unity.Forms.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Prism.Unity.Forms
5 |
6 |
7 |
8 |
9 | This is horrendous, but Xamarin did not provide a non-generic version of the DependencyService.Get method call.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Registers a Page for navigation.
17 |
18 | The Type of Page to register
19 | used to register type for Navigation.
20 | The unique name to register with the Page
21 |
22 |
23 |
24 | Registers a Page for navigation
25 |
26 | used to register type for Navigation.
27 | The type of Page to register
28 | The unique name to register with the Page
29 |
30 |
31 |
32 |
33 | Registers a Page for navigation.
34 |
35 | The Type of Page to register
36 | The ViewModel to use as the BindingContext for the Page
37 | The unique name to register with the Page
38 |
39 |
40 |
41 |
42 | Registers a Page for navigation based on the current Device OS using a shared ViewModel
43 |
44 | Default View Type to be shared across multiple Device Operating Systems if they are not specified directly.
45 | Shared ViewModel Type
46 | used to register type for Navigation.
47 | The unique name to register with the Page. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
48 | Android Specific View Type
49 | iOS Specific View Type
50 | Other Platform Specific View Type
51 | Windows Specific View Type
52 | Windows Phone Specific View Type
53 |
54 |
55 |
56 |
57 | Registers a Page for navigation based on the Device Idiom using a shared ViewModel
58 |
59 | Default View Type to be used across multiple Idioms if they are not specified directly.
60 | The shared ViewModel
61 | used to register type for Navigation.
62 | The common name used for Navigation. If left empty or null will default to the ViewModel root name. i.e. MyPageViewModel => MyPage
63 | Desktop Specific View Type
64 | Tablet Specific View Type
65 | Phone Specific View Type
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/UsingValidation/UsingValidation.UWP/UsingValidation.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {5F0A88CA-CD17-413E-88C9-07741C36C671}
8 | AppContainerExe
9 | Properties
10 | UsingValidation.UWP
11 | UsingValidation.UWP
12 | en-US
13 | UAP
14 | 10.0.14393.0
15 | 10.0.10586.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | UsingValidation.UWP_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 |
101 | MainPage.xaml
102 |
103 |
104 |
105 |
106 |
107 | Designer
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | MSBuild:Compile
124 | Designer
125 |
126 |
127 | MSBuild:Compile
128 | Designer
129 |
130 |
131 |
132 |
133 | UsingValidation
134 |
135 |
136 |
137 | 14.0
138 |
139 |
140 |
147 |
--------------------------------------------------------------------------------
/UsingValidation/UsingValidation/UsingValidation.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {E05D5699-9971-4C37-8898-A60D9C902AB4}
9 | Library
10 | Properties
11 | UsingValidation
12 | UsingValidation
13 | v4.5
14 | Profile7
15 | 512
16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 | App.xaml
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | MainPage.xaml
49 |
50 |
51 |
52 |
53 | ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll
54 | True
55 |
56 |
57 | ..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll
58 | True
59 |
60 |
61 | ..\..\packages\Prism.Core.6.2.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.dll
62 | True
63 |
64 |
65 | ..\..\packages\Prism.Forms.6.2.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.Forms.dll
66 | True
67 |
68 |
69 | ..\..\packages\Prism.Unity.Forms.6.2.0\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Prism.Unity.Forms.dll
70 | True
71 |
72 |
73 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll
74 |
75 |
76 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll
77 |
78 |
79 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll
80 |
81 |
82 |
83 |
84 | MSBuild:UpdateDesignTimeXaml
85 | Designer
86 |
87 |
88 | MSBuild:UpdateDesignTimeXaml
89 | Designer
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
101 |
102 |
103 |
104 |
105 |
112 |
--------------------------------------------------------------------------------
/UsingValidation/UsingValidation.iOS/UsingValidation.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {5B636BFD-BFB6-43FC-8F60-6AAB03973898}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Exe
11 | UsingValidation.iOS
12 | Resources
13 | UsingValidation.iOS
14 |
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\iPhoneSimulator\Debug
22 | DEBUG
23 | prompt
24 | 4
25 | false
26 | i386, x86_64
27 | None
28 | true
29 |
30 |
31 | none
32 | true
33 | bin\iPhoneSimulator\Release
34 | prompt
35 | 4
36 | None
37 | i386, x86_64
38 | false
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | false
49 | ARMv7, ARM64
50 | iPhone Developer
51 | true
52 | Entitlements.plist
53 |
54 |
55 | none
56 | true
57 | bin\iPhone\Release
58 | prompt
59 | 4
60 | ARMv7, ARM64
61 | false
62 | iPhone Developer
63 | Entitlements.plist
64 |
65 |
66 | none
67 | True
68 | bin\iPhone\Ad-Hoc
69 | prompt
70 | 4
71 | False
72 | ARMv7, ARM64
73 | True
74 | Automatic:AdHoc
75 | iPhone Distribution
76 | Entitlements.plist
77 |
78 |
79 | none
80 | True
81 | bin\iPhone\AppStore
82 | prompt
83 | 4
84 | False
85 | ARMv7, ARM64
86 | Automatic:AppStore
87 | iPhone Distribution
88 | Entitlements.plist
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | UsingValidation
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll
127 | True
128 |
129 |
130 | ..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll
131 | True
132 |
133 |
134 | ..\..\packages\Prism.Core.6.2.0\lib\Xamarin.iOS10\Prism.dll
135 | True
136 |
137 |
138 | ..\..\packages\Prism.Forms.6.2.0\lib\Xamarin.iOS1.0\Prism.Forms.dll
139 | True
140 |
141 |
142 | ..\..\packages\Prism.Unity.Forms.6.2.0\lib\Xamarin.iOS1.0\Prism.Unity.Forms.dll
143 | True
144 |
145 |
146 |
147 |
148 |
149 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
150 |
151 |
152 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
153 |
154 |
155 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
156 |
157 |
158 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
167 |
168 |
169 |
170 |
--------------------------------------------------------------------------------
/UsingValidation/UsingValidation.Droid/UsingValidation.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {FAA6365F-E99F-482D-BA4C-1CBDC4B8442C}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | UsingValidation.Droid
13 | UsingValidation.Droid
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | Properties\AndroidManifest.xml
19 | true
20 | v6.0
21 | armeabi,armeabi-v7a,x86
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | true
31 | full
32 | false
33 | bin\Debug\
34 | DEBUG;TRACE
35 | prompt
36 | 4
37 | True
38 | None
39 |
40 |
41 | pdbonly
42 | true
43 | bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 | False
48 | SdkOnly
49 |
50 |
51 |
52 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\MonoAndroid10\FormsViewGroup.dll
53 |
54 |
55 | ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll
56 | True
57 |
58 |
59 | ..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll
60 | True
61 |
62 |
63 |
64 |
65 | ..\..\packages\Prism.Core.6.2.0\lib\MonoAndroid10\Prism.dll
66 | True
67 |
68 |
69 | ..\..\packages\Prism.Forms.6.2.0\lib\MonoAndroid1.0\Prism.Forms.dll
70 | True
71 |
72 |
73 | ..\..\packages\Prism.Unity.Forms.6.2.0\lib\MonoAndroid1.0\Prism.Unity.Forms.dll
74 | True
75 |
76 |
77 |
78 |
79 |
80 |
81 | ..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
82 | True
83 |
84 |
85 | ..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
86 | True
87 |
88 |
89 | ..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
90 | True
91 |
92 |
93 | ..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
94 | True
95 |
96 |
97 | ..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
98 | True
99 |
100 |
101 | ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
102 | True
103 |
104 |
105 | ..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
106 | True
107 |
108 |
109 | ..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
110 | True
111 |
112 |
113 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\MonoAndroid10\Xamarin.Forms.Core.dll
114 |
115 |
116 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
117 |
118 |
119 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
120 |
121 |
122 | ..\..\packages\Xamarin.Forms.2.3.4.192-pre2\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 | Designer
153 |
154 |
155 |
156 |
157 | UsingValidation
158 |
159 |
160 |
161 |
162 |
163 |
164 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
165 |
166 |
167 |
168 |
169 |
170 |
171 |
178 |
--------------------------------------------------------------------------------
/packages/Unity.4.0.1/UnityConfiguration30.xsd:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
--------------------------------------------------------------------------------
/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Practices.ServiceLocation
5 |
6 |
7 |
8 |
9 | The standard exception thrown when a ServiceLocator has an error in resolving an object.
10 |
11 |
12 |
13 |
14 | Initializes a new instance of the class.
15 |
16 |
17 |
18 |
19 | Initializes a new instance of the class with a specified error message.
20 |
21 |
22 | The message that describes the error.
23 |
24 |
25 |
26 |
27 | Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
28 |
29 |
30 | The error message that explains the reason for the exception.
31 |
32 |
33 | The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
34 |
35 |
36 |
37 |
38 | The generic Service Locator interface. This interface is used
39 | to retrieve services (instances identified by type and optional
40 | name) from a container.
41 |
42 |
43 |
44 |
45 | Get an instance of the given .
46 |
47 | Type of object requested.
48 | if there is an error resolving
49 | the service instance.
50 | The requested service instance.
51 |
52 |
53 |
54 | Get an instance of the given named .
55 |
56 | Type of object requested.
57 | Name the object was registered with.
58 | if there is an error resolving
59 | the service instance.
60 | The requested service instance.
61 |
62 |
63 |
64 | Get all instances of the given currently
65 | registered in the container.
66 |
67 | Type of object requested.
68 | if there is are errors resolving
69 | the service instance.
70 | A sequence of instances of the requested .
71 |
72 |
73 |
74 | Get an instance of the given .
75 |
76 | Type of object requested.
77 | if there is are errors resolving
78 | the service instance.
79 | The requested service instance.
80 |
81 |
82 |
83 | Get an instance of the given named .
84 |
85 | Type of object requested.
86 | Name the object was registered with.
87 | if there is are errors resolving
88 | the service instance.
89 | The requested service instance.
90 |
91 |
92 |
93 | Get all instances of the given currently
94 | registered in the container.
95 |
96 | Type of object requested.
97 | if there is are errors resolving
98 | the service instance.
99 | A sequence of instances of the requested .
100 |
101 |
102 |
103 | This class provides the ambient container for this application. If your
104 | framework defines such an ambient container, use ServiceLocator.Current
105 | to get it.
106 |
107 |
108 |
109 |
110 | Set the delegate that is used to retrieve the current container.
111 |
112 | Delegate that, when called, will return
113 | the current ambient container.
114 |
115 |
116 |
117 | The current ambient container.
118 |
119 |
120 |
121 |
122 | This class is a helper that provides a default implementation
123 | for most of the methods of .
124 |
125 |
126 |
127 |
128 | Implementation of .
129 |
130 | The requested service.
131 | if there is an error in resolving the service instance.
132 | The requested object.
133 |
134 |
135 |
136 | Get an instance of the given .
137 |
138 | Type of object requested.
139 | if there is an error resolving
140 | the service instance.
141 | The requested service instance.
142 |
143 |
144 |
145 | Get an instance of the given named .
146 |
147 | Type of object requested.
148 | Name the object was registered with.
149 | if there is an error resolving
150 | the service instance.
151 | The requested service instance.
152 |
153 |
154 |
155 | Get all instances of the given currently
156 | registered in the container.
157 |
158 | Type of object requested.
159 | if there is are errors resolving
160 | the service instance.
161 | A sequence of instances of the requested .
162 |
163 |
164 |
165 | Get an instance of the given .
166 |
167 | Type of object requested.
168 | if there is are errors resolving
169 | the service instance.
170 | The requested service instance.
171 |
172 |
173 |
174 | Get an instance of the given named .
175 |
176 | Type of object requested.
177 | Name the object was registered with.
178 | if there is are errors resolving
179 | the service instance.
180 | The requested service instance.
181 |
182 |
183 |
184 | Get all instances of the given currently
185 | registered in the container.
186 |
187 | Type of object requested.
188 | if there is are errors resolving
189 | the service instance.
190 | A sequence of instances of the requested .
191 |
192 |
193 |
194 | When implemented by inheriting classes, this method will do the actual work of resolving
195 | the requested service instance.
196 |
197 | Type of instance requested.
198 | Name of registered service you want. May be null.
199 | The requested service instance.
200 |
201 |
202 |
203 | When implemented by inheriting classes, this method will do the actual work of
204 | resolving all the requested service instances.
205 |
206 | Type of service requested.
207 | Sequence of service instance objects.
208 |
209 |
210 |
211 | Format the exception message for use in an
212 | that occurs while resolving a single service.
213 |
214 | The actual exception thrown by the implementation.
215 | Type of service requested.
216 | Name requested.
217 | The formatted exception message string.
218 |
219 |
220 |
221 | Format the exception message for use in an
222 | that occurs while resolving multiple service instances.
223 |
224 | The actual exception thrown by the implementation.
225 | Type of service requested.
226 | The formatted exception message string.
227 |
228 |
229 |
230 | This delegate type is used to provide a method that will
231 | return the current container. Used with the
232 | static accessor class.
233 |
234 | An .
235 |
236 |
237 |
238 | A strongly-typed resource class, for looking up localized strings, etc.
239 |
240 |
241 |
242 |
243 | Returns the cached ResourceManager instance used by this class.
244 |
245 |
246 |
247 |
248 | Overrides the current thread's CurrentUICulture property for all
249 | resource lookups using this strongly typed resource class.
250 |
251 |
252 |
253 |
254 | Looks up a localized string similar to Activation error occurred while trying to get all instances of type {0}.
255 |
256 |
257 |
258 |
259 | Looks up a localized string similar to Activation error occurred while trying to get instance of type {0}, key "{1}".
260 |
261 |
262 |
263 |
264 | Looks up a localized string similar to ServiceLocationProvider must be set..
265 |
266 |
267 |
268 |
269 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UsingValidation
2 | Xamarin.Forms validation sample using INotifyDataErrorInfo
3 |
4 | This post is also available in the Premier Developer blog.
5 | I have recently been investigating the support available in Xamarin.Forms for validation and, in particular, researched the possibility of using INotifyDataErrorInfo to complement the traditional approach of using Behaviors.
6 | In simple scenarios, it's possible to perform validation by simply attaching a Behavior to the required view, as shown by the following sample code:
7 |
8 | public class SampleValidationBehavior:Behavior<Entry>
9 | {
10 | protected override void OnAttachedTo(Entry entry)
11 | {
12 | entry.TextChanged += OnEntryTextChanged;
13 | base.OnAttachedTo(entry);
14 | }
15 |
16 | protected override void OnDetachingFrom(Entry entry)
17 | {
18 | entry.TextChanged -= OnEntryTextChanged;
19 | base.OnDetachingFrom(entry);
20 | }
21 |
22 | void OnEntryTextChanged(object sender, TextChangedEventArgs args)
23 | {
24 | var textValue = args.NewTextValue;
25 | bool isValid = !string.IsNullOrEmpty(textValue) && textValue.Length >= 5;
26 | ((Entry)sender).TextColor = isValid ? Color.Default : Color.Red;
27 | }
28 | }
29 |
30 | In this case, we are validating the input and modifying the UI if the number of characters entered is less than 5.
31 |
32 | What about more articulated scenarios when multiple business rules are required to be checked for the input values?
33 |
34 | In these cases, we could take advantage of other types available to make our code more structured and extensible:
35 |
36 | - INotifyDataErrorInfo: available in Xamarin.Forms. When implemented it permits specifying custom validation supporting multiple errors per property, cross-property errors and entity-level errors;
37 | - DataAnnotations decorate the data models using attributes which specify validation conditions to be applied to the specific field;
38 | - Forms Behaviors specify the specific UI to be applied to the specific validation scenarios, integrating with INotifyDataErrorInfo and DataAnnotations.
39 |
40 | To start exploring this approach, I created a new Xamarin.Forms Prism solution using the Prism Template Pack which generated the following project structure:
41 |
42 |
43 |
44 | Then, I added the following new model to be validated using DataAnnotations and INotifyDataErrorInfo:
45 | using System.ComponentModel.DataAnnotations;
46 | using System.Runtime.CompilerServices;
47 | using UsingValidation.Validation;
48 |
49 | namespace UsingValidation.Models
50 | {
51 | public class Item : ValidationBase
52 | {
53 | public Item()
54 | {
55 | Name = string.Empty;
56 | Description = string.Empty;
57 | }
58 |
59 | private string _name;
60 | private string _description;
61 |
62 | [Required(ErrorMessage = "Name cannot be empty!")]
63 | public string Name
64 | {
65 | get { return _name; }
66 | set
67 | {
68 | ValidateProperty(value);
69 | SetProperty(ref _name, value);
70 | }
71 | }
72 |
73 | [Required(ErrorMessage = "Description cannot be empty!")]
74 | [RegularExpression(@"\w{5,}", ErrorMessage = "Description: more than 4 letters/numbers required")]
75 | public string Description
76 | {
77 | get { return _description; }
78 | set
79 | {
80 | ValidateProperty(value);
81 | SetProperty(ref _description, value);
82 | }
83 | }
84 |
85 | protected override void ValidateProperty(object value, [CallerMemberName] string propertyName = null)
86 | {
87 | base.ValidateProperty(value, propertyName);
88 |
89 | OnPropertyChanged("IsSubmitEnabled");
90 | }
91 |
92 | public bool IsSubmitEnabled
93 | {
94 | get
95 | {
96 | return !HasErrors;
97 | }
98 | }
99 | }
100 | }
101 | The model uses attributes declared in the SystemComponentModel.DataAnnotations namespace which can be referenced in the solution modifying the Portable Class Library profile of the UsingValidation common project:
102 |
103 |
104 |
105 | Quick tip: to be able to change the PCL profile I had to remove all the NuGet packages used by the common project, remove the Windows Phone 8 profile and then add back all the removed NuGet packages to the UsingValidation PCL.
106 |
107 | To use the capability offered by INotifyDataErrorInfo, the model needs to implements 3 members defined in the interface:
108 |
109 | - GetErrors() returns an IEnumerable sequence of strings containing the error messages triggered by validation;
110 | - the HasErrors property returns a boolean value indicating if there are validation errors;
111 | - ErrorsChanged event can be triggered to Notify if the validation errors have been updated.
112 |
113 | This interface is quite flexible and is designed to be customised depending on the different scenarios needed: I took as a starting point this implementation available on GitHub and modified it accordingly: I decided to separate the implementation of INotifyDataErrorInfo in a different base class called ValidationBase which contains the following code using a Dictionary<string, List<string>> needed for storing the generated validation errors:
114 | public class ValidationBase : BindableBase, INotifyDataErrorInfo
115 | {
116 | private Dictionary<string, List<string>> _errors = new Dictionary<string, List<string>>();
117 |
118 | public ValidationBase()
119 | {
120 | ErrorsChanged += ValidationBase_ErrorsChanged;
121 | }
122 |
123 | private void ValidationBase_ErrorsChanged(object sender, DataErrorsChangedEventArgs e)
124 | {
125 | OnPropertyChanged("HasErrors");
126 | OnPropertyChanged("ErrorsList");
127 | }
128 |
129 | #region INotifyDataErrorInfo Members
130 |
131 | public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
132 |
133 | public IEnumerable GetErrors(string propertyName)
134 | {
135 | if (!string.IsNullOrEmpty(propertyName))
136 | {
137 | if (_errors.ContainsKey(propertyName) && (_errors[propertyName].Any()))
138 | {
139 | return _errors[propertyName].ToList();
140 | }
141 | else
142 | {
143 | return new List<string>();
144 | }
145 | }
146 | else
147 | {
148 | return _errors.SelectMany(err => err.Value.ToList()).ToList();
149 | }
150 | }
151 |
152 | public bool HasErrors
153 | {
154 | get
155 | {
156 | return _errors.Any(propErrors => propErrors.Value.Any());
157 | }
158 | }
159 |
160 | #endregion
161 |
162 | The validation is performed by this method which evaluates the DataAnnotations decorating the model using the Validator available in the System.ComponentModel.DataAnnotations namespace and then stores the error messages in the dictionary:
163 | protected virtual void ValidateProperty(object value, [CallerMemberName] string propertyName = null)
164 | {
165 | var validationContext = new ValidationContext(this, null)
166 | {
167 | MemberName = propertyName
168 | };
169 |
170 | var validationResults = new List<ValidationResult>();
171 | Validator.TryValidateProperty(value, validationContext, validationResults);
172 | RemoveErrorsByPropertyName(propertyName);
173 |
174 | HandleValidationResults(validationResults);
175 | }
176 | At this stage, I needed a solution for linking the UI to the model, and modifying the visuals depending on the presence or not of validation errors.
177 |
178 | The ViewModel for the sample page, contains only a property storing an instance of the item defined in the model:
179 | public class MainPageViewModel : BindableBase, INavigationAware
180 | {
181 | public MainPageViewModel()
182 | {
183 | DemoItem = new Item();
184 | }
185 |
186 | private Item _item;
187 | public Item DemoItem
188 | {
189 | get { return _item; }
190 | set { SetProperty(ref _item, value); }
191 | }
192 |
193 | public void OnNavigatedFrom(NavigationParameters parameters)
194 | {
195 | }
196 |
197 | public void OnNavigatedTo(NavigationParameters parameters)
198 | {
199 | DemoItem.Name = string.Empty;
200 | DemoItem.Description = string.Empty;
201 | }
202 | }
203 | Then, the corresponding XAML contains two Entry views used for input and a ListView used for showing the validation errors:
204 | <?xml version="1.0" encoding="utf-8" ?>
205 | <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
206 | xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
207 | xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
208 | xmlns:validation="clr-namespace:UsingValidation.Validation"
209 | xmlns:effects="clr-namespace:UsingValidation.Effects"
210 | prism:ViewModelLocator.AutowireViewModel="True"
211 | x:Class="UsingValidation.Views.MainPage"
212 | Title="MainPage">
213 | <Grid VerticalOptions="Center">
214 | ……
215 | <Label Text ="Name: " VerticalTextAlignment="Center" Grid.Column="1" />
216 | <Entry Text="{Binding Name, Mode=TwoWay}" BindingContext="{Binding DemoItem}"
217 | Grid.Column="2" HorizontalOptions="FillAndExpand">
218 | <Entry.Behaviors>
219 | <validation:EntryValidationBehavior PropertyName="Name" />
220 | </Entry.Behaviors>
221 | </Entry>
222 |
223 | <Label Text ="Description: " VerticalTextAlignment="Center" Grid.Column="1" Grid.Row="2" />
224 | <Entry Text="{Binding Description, Mode=TwoWay}" BindingContext="{Binding DemoItem}"
225 | Grid.Column="2" HorizontalOptions="FillAndExpand" Grid.Row="2">
226 | <Entry.Behaviors>
227 | <validation:EntryValidationBehavior PropertyName="Description" />
228 | </Entry.Behaviors>
229 | </Entry>
230 |
231 | <ListView ItemsSource="{Binding DemoItem.ErrorsList}"
232 | Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" />
233 |
234 | <Button Text="Submit" IsEnabled="{Binding DemoItem.IsSubmitEnabled}"
235 | Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" />
236 | </Grid>
237 | </ContentPage>
238 | The sample page uses a Behavior called EntryValidationBehavior which take care of changing the colour of the Entry background views in the case validation errors are present:
239 | using System.Linq;
240 | using UsingValidation.Effects;
241 | using Xamarin.Forms;
242 |
243 | namespace UsingValidation.Validation
244 | {
245 | public class EntryValidationBehavior : Behavior<Entry>
246 | {
247 | private Entry _associatedObject;
248 |
249 | protected override void OnAttachedTo(Entry bindable)
250 | {
251 | base.OnAttachedTo(bindable);
252 |
253 | _associatedObject = bindable;
254 |
255 | _associatedObject.TextChanged += _associatedObject_TextChanged;
256 | }
257 |
258 | void _associatedObject_TextChanged(object sender, TextChangedEventArgs e)
259 | {
260 | var source = _associatedObject.BindingContext as ValidationBase;
261 | if (source != null && !string.IsNullOrEmpty(PropertyName))
262 | {
263 | var errors = source.GetErrors(PropertyName).Cast<string>();
264 | if (errors != null && errors.Any())
265 | {
266 | var borderEffect = _associatedObject.Effects.FirstOrDefault(eff => eff is BorderEffect);
267 | if (borderEffect == null)
268 | {
269 | _associatedObject.Effects.Add(new BorderEffect());
270 | }
271 |
272 | if (Device.OS != TargetPlatform.Windows)
273 | {
274 | _associatedObject.BackgroundColor = Color.Red;
275 | }
276 | }
277 | else
278 | {
279 | var borderEffect = _associatedObject.Effects.FirstOrDefault(eff => eff is BorderEffect);
280 | if (borderEffect != null)
281 | {
282 | _associatedObject.Effects.Remove(borderEffect);
283 | }
284 |
285 | if (Device.OS != TargetPlatform.Windows)
286 | {
287 | _associatedObject.BackgroundColor = Color.Default;
288 | }
289 | }
290 | }
291 | }
292 |
293 | protected override void OnDetachingFrom(Entry bindable)
294 | {
295 | base.OnDetachingFrom(bindable);
296 | // Perform clean up
297 |
298 | _associatedObject.TextChanged += _associatedObject_TextChanged;
299 |
300 | _associatedObject = null;
301 | }
302 |
303 | public string PropertyName { get; set; }
304 | }
305 | }
306 | The UI is also fine-tuned using a Xamarin.Forms effect applied only to the UWP platform, in order to change the colour of the Entry border when validation errors occur:
307 | using UsingValidation.UWP.Effects;
308 | using Windows.UI;
309 | using Windows.UI.Xaml.Media;
310 | using Xamarin.Forms;
311 | using Xamarin.Forms.Platform.UWP;
312 |
313 | [assembly: ResolutionGroupName("UsingValidationSample")]
314 | [assembly: ExportEffect(typeof(BorderEffect), "BorderEffect")]
315 | namespace UsingValidation.UWP.Effects
316 | {
317 | public class BorderEffect : PlatformEffect
318 | {
319 | Brush _previousBrush;
320 | Brush _previousBorderBrush;
321 | Brush _previousFocusBrush;
322 | FormsTextBox _control;
323 |
324 | protected override void OnAttached()
325 | {
326 | _control = Control as FormsTextBox;
327 | if (_control != null)
328 | {
329 | _previousBrush = _control.Background;
330 | _previousFocusBrush = _control.BackgroundFocusBrush;
331 | _previousBorderBrush = _control.BorderBrush;
332 | _control.Background = new SolidColorBrush(Colors.Red);
333 | _control.BackgroundFocusBrush = new SolidColorBrush(Colors.Red);
334 | _control.BorderBrush = new SolidColorBrush(Colors.Red);
335 | }
336 | }
337 |
338 | protected override void OnDetached()
339 | {
340 | if (_control != null)
341 | {
342 | _control.Background = _previousBrush;
343 | _control.BackgroundFocusBrush = _previousFocusBrush;
344 | _control.BorderBrush = _previousBorderBrush;
345 | }
346 | }
347 | }
348 | }
349 | And this is the result when the application is executed on Android and UWP:
350 |
351 |
352 |
353 |
354 |
355 | Conclusions
356 |
357 | Xamarin.Forms provides a rich set of features for implementing validation: the usage of INotifyDataErrorInfo, Data Annotations, Behaviors and Effects permit the handling of complex scenarios including multiple conditions per field, cross-property validation, entity-level validation and custom UI depending on the platform.
358 |
359 | Happy coding!
360 |
--------------------------------------------------------------------------------