├── .gitattributes ├── .gitignore ├── Lib ├── NavigationSam.Droid │ ├── FormsAppCompatActivitySam.cs │ ├── NavigationSam.Droid.csproj │ ├── NavigationSamRenderer.cs │ ├── Preserver.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ └── values │ │ └── strings.xml ├── NavigationSam.UWP │ ├── NavigationSam.UWP.csproj │ ├── NavigationSamRenderer.cs │ ├── Preserver.cs │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── NavigationSam.UWP.rd.xml ├── NavigationSam.iOS │ ├── NavigationSam.iOS.csproj │ ├── NavigationSamRenderer.cs │ ├── Preserver.cs │ └── Properties │ │ └── AssemblyInfo.cs └── NavigationSam │ ├── INavigationPopInterceptor.cs │ ├── NavigationPageSam.cs │ ├── NavigationSam.csproj │ └── Utils │ ├── PopResult.cs │ └── PopSources.cs ├── NavigationSam.sln ├── Nuget ├── 1.gif ├── 2.gif ├── 3.gif ├── NavigationSam.nuspec ├── icon.png └── nuget.exe ├── README.md └── Sample ├── Sample.Android ├── Assets │ └── AboutAssets.txt ├── MainActivity.cs ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs ├── Resources │ ├── AboutResources.txt │ ├── Resource.designer.cs │ ├── layout │ │ ├── Tabbar.xml │ │ └── Toolbar.xml │ ├── mipmap-anydpi-v26 │ │ ├── icon.xml │ │ └── icon_round.xml │ ├── mipmap-hdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-mdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ ├── mipmap-xxxhdpi │ │ ├── icon.png │ │ └── launcher_foreground.png │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── Sample.Android.csproj ├── Sample.UWP ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-100.png │ ├── SplashScreen.scale-200.png │ ├── SplashScreen.scale-400.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ ├── Square44x44Logo.scale-100.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.scale-400.png │ ├── Square44x44Logo.targetsize-16.png │ ├── Square44x44Logo.targetsize-256.png │ ├── Square44x44Logo.targetsize-48.png │ ├── StoreLogo.backup.png │ ├── StoreLogo.scale-100.png │ ├── StoreLogo.scale-200.png │ ├── StoreLogo.scale-400.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── MainPage.xaml ├── MainPage.xaml.cs ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml └── Sample.UWP.csproj ├── Sample.iOS ├── AppDelegate.cs ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon1024.png │ │ ├── Icon120.png │ │ ├── Icon152.png │ │ ├── Icon167.png │ │ ├── Icon180.png │ │ ├── Icon20.png │ │ ├── Icon29.png │ │ ├── Icon40.png │ │ ├── Icon58.png │ │ ├── Icon60.png │ │ ├── Icon76.png │ │ ├── Icon80.png │ │ └── Icon87.png ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Properties │ └── AssemblyInfo.cs ├── Resources │ ├── Default-568h@2x.png │ ├── Default-Portrait.png │ ├── Default-Portrait@2x.png │ ├── Default.png │ ├── Default@2x.png │ └── LaunchScreen.storyboard └── Sample.iOS.csproj └── Sample ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── MasterPage.xaml ├── MasterPage.xaml.cs ├── Sample.csproj ├── User.cs ├── Variant1 ├── EditPage.xaml ├── EditPage.xaml.cs ├── MainPage.xaml ├── MainPage.xaml.cs ├── SamplePage.xaml └── SamplePage.xaml.cs └── Variant2 ├── EditPage.xaml ├── EditPage.xaml.cs ├── MainPage.xaml ├── MainPage.xaml.cs └── ViewModels ├── BaseViewModel.cs ├── EditVm.cs └── MainVm.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/FormsAppCompatActivitySam.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.OS; 4 | using Android.Runtime; 5 | using Android.Views; 6 | using Android.Widget; 7 | using NavigationSam.Utils; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using Xamarin.Forms.Platform.Android; 14 | 15 | namespace NavigationSam.Droid 16 | { 17 | [Preserve(AllMembers = true)] 18 | public class FormsAppCompatActivitySam : FormsAppCompatActivity, IDisposable 19 | { 20 | internal static void Preserve() { } 21 | 22 | public static event BackButtonPressedSamEventHandler BackPressedSam; 23 | public delegate Task BackButtonPressedSamEventHandler(PopSources popSource, PopResult popResult); 24 | 25 | public FormsAppCompatActivitySam() : base() 26 | { 27 | } 28 | 29 | 30 | public async override void OnBackPressed() 31 | { 32 | if (BackPressedSam == null) 33 | { 34 | base.OnBackPressed(); 35 | } 36 | else 37 | { 38 | var popResult = new PopResult(); 39 | await BackPressedSam(PopSources.HardwareBackButton, popResult); 40 | 41 | // When is root page 42 | if (popResult.IsContinueHardwareButton) 43 | base.OnBackPressed(); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/NavigationSam.Droid.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E} 9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {9ef11e43-1701-4396-8835-8392d57abb70} 11 | Library 12 | Properties 13 | NavigationSam.Droid 14 | NavigationSam.Droid 15 | 512 16 | True 17 | Resources\Resource.designer.cs 18 | Off 19 | false 20 | v10.0 21 | true 22 | 23 | 24 | true 25 | portable 26 | false 27 | bin\Debug\ 28 | DEBUG;TRACE 29 | prompt 30 | 4 31 | 32 | 33 | portable 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 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 | 5.0.0.1874 68 | 69 | 70 | 71 | 72 | {4aceda25-2a0e-47f1-a7e2-2324935cfd9d} 73 | NavigationSam 74 | 75 | 76 | 77 | 84 | -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/NavigationSamRenderer.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Views; 3 | using AndroidX.AppCompat.Widget; 4 | using NavigationSam; 5 | using NavigationSam.Droid; 6 | using NavigationSam.Utils; 7 | using System; 8 | using System.Threading.Tasks; 9 | using Xamarin.Forms; 10 | using Xamarin.Forms.Internals; 11 | using Xamarin.Forms.Platform.Android; 12 | using Xamarin.Forms.Platform.Android.AppCompat; 13 | using static Android.Views.View; 14 | using XfView = Xamarin.Forms.View; 15 | 16 | [assembly: ExportRenderer(typeof(NavigationPageSam), typeof(NavigationSamRenderer))] 17 | namespace NavigationSam.Droid 18 | { 19 | [Preserve(AllMembers = true)] 20 | public class NavigationSamRenderer : NavigationPageRenderer, IOnClickListener 21 | { 22 | public static void Preserve() { } 23 | 24 | public NavigationSamRenderer(Context context) : base(context) 25 | { 26 | FormsAppCompatActivitySam.BackPressedSam += OnBackPressed; 27 | Device.Info.PropertyChanged += OnDevicePropertyChanged; 28 | } 29 | 30 | private NavigationPageSam NavPage => Element as NavigationPageSam; 31 | private IPageController PageController => Element; 32 | 33 | #region override 34 | /// 35 | /// Click "Button arrow back" 36 | /// 37 | async void IOnClickListener.OnClick(Android.Views.View v) 38 | { 39 | var mp = GetMasterPage(); 40 | 41 | if (mp == null || Element.Navigation.NavigationStack.Count > 1) 42 | { 43 | await NavPage.CatchBackButton(PopSources.SoftwareBackButton, new PopResult()); 44 | } 45 | else 46 | { 47 | mp.IsPresented = !mp.IsPresented; 48 | } 49 | } 50 | 51 | protected override void OnLayout(bool changed, int l, int t, int r, int b) 52 | { 53 | base.OnLayout(changed, l, t, r, b); 54 | UpdateToolbarInterceptFunctional(); 55 | } 56 | 57 | protected override void OnAttachedToWindow() 58 | { 59 | base.OnAttachedToWindow(); 60 | UpdateToolbarInterceptFunctional(); 61 | } 62 | 63 | protected override void Dispose(bool disposing) 64 | { 65 | base.Dispose(disposing); 66 | 67 | FormsAppCompatActivitySam.BackPressedSam -= OnBackPressed; 68 | Device.Info.PropertyChanged -= OnDevicePropertyChanged; 69 | } 70 | #endregion override 71 | 72 | 73 | #region methods 74 | private FlyoutPage GetMasterPage() 75 | { 76 | FlyoutPage master = null; 77 | Element page = Element.RealParent; 78 | while (page != null) 79 | { 80 | if (page is FlyoutPage masterPage) 81 | { 82 | master = masterPage; 83 | break; 84 | }; 85 | 86 | page = page.RealParent; 87 | } 88 | 89 | if (master == null) 90 | { 91 | if (PageController.InternalChildren.Count > 0) 92 | master = PageController.InternalChildren[0] as FlyoutPage; 93 | } 94 | 95 | return master; 96 | } 97 | 98 | private void UpdateToolbarInterceptFunctional() 99 | { 100 | var views = new System.Collections.Generic.List(); 101 | for (int i = 0; i < ChildCount; i++) 102 | { 103 | var child = GetChildAt(i); 104 | views.Add(child); 105 | 106 | if (child is Toolbar toolbar) 107 | toolbar.SetNavigationOnClickListener(this); 108 | } 109 | } 110 | 111 | private Task OnBackPressed(PopSources source, PopResult popResult) 112 | { 113 | return NavPage.CatchBackButton(source, popResult); 114 | } 115 | 116 | private void OnDevicePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) 117 | { 118 | if (nameof(Device.Info.CurrentOrientation) == e.PropertyName) 119 | UpdateToolbarInterceptFunctional(); 120 | } 121 | #endregion methods 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/Preserver.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Content; 3 | using Android.OS; 4 | using Android.Runtime; 5 | using Android.Views; 6 | using Android.Widget; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | 12 | namespace NavigationSam.Droid 13 | { 14 | [Preserve(AllMembers = true)] 15 | public static class Preserver 16 | { 17 | public static void Preserve() 18 | { 19 | NavigationPageSam.Preserve(); 20 | Utils.PopResult.Preserve(); 21 | NavigationSamRenderer.Preserve(); 22 | FormsAppCompatActivitySam.Preserve(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("NavigationSam.Droid")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("NavigationSam.Droid")] 14 | [assembly: AssemblyCopyright("Copyright © 2018")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | [assembly: AssemblyVersion("1.0.0.0")] 26 | [assembly: AssemblyFileVersion("1.0.0.0")] 27 | -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.xml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.xml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /Lib/NavigationSam.Droid/Resources/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Hello World, Click Me! 3 | NavigationSam.Droid 4 | 5 | -------------------------------------------------------------------------------- /Lib/NavigationSam.UWP/NavigationSam.UWP.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942} 8 | Library 9 | Properties 10 | NavigationSam.UWP 11 | NavigationSam.UWP 12 | ru-RU 13 | UAP 14 | 10.0.17763.0 15 | 10.0.17763.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | 20 | 21 | AnyCPU 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 27 | prompt 28 | 4 29 | 30 | 31 | AnyCPU 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE;NETFX_CORE;WINDOWS_UWP 36 | prompt 37 | 4 38 | 39 | 40 | x86 41 | true 42 | bin\x86\Debug\ 43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 44 | ;2008 45 | full 46 | false 47 | prompt 48 | 49 | 50 | x86 51 | bin\x86\Release\ 52 | TRACE;NETFX_CORE;WINDOWS_UWP 53 | true 54 | ;2008 55 | pdbonly 56 | false 57 | prompt 58 | 59 | 60 | ARM 61 | true 62 | bin\ARM\Debug\ 63 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 64 | ;2008 65 | full 66 | false 67 | prompt 68 | 69 | 70 | ARM 71 | bin\ARM\Release\ 72 | TRACE;NETFX_CORE;WINDOWS_UWP 73 | true 74 | ;2008 75 | pdbonly 76 | false 77 | prompt 78 | 79 | 80 | ARM64 81 | true 82 | bin\ARM64\Debug\ 83 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 84 | ;2008 85 | full 86 | false 87 | prompt 88 | 89 | 90 | ARM64 91 | bin\ARM64\Release\ 92 | TRACE;NETFX_CORE;WINDOWS_UWP 93 | true 94 | ;2008 95 | pdbonly 96 | false 97 | prompt 98 | 99 | 100 | x64 101 | true 102 | bin\x64\Debug\ 103 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 104 | ;2008 105 | full 106 | false 107 | prompt 108 | 109 | 110 | x64 111 | bin\x64\Release\ 112 | TRACE;NETFX_CORE;WINDOWS_UWP 113 | true 114 | ;2008 115 | pdbonly 116 | false 117 | prompt 118 | 119 | 120 | PackageReference 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 6.2.10 131 | 132 | 133 | 5.0.0.1874 134 | 135 | 136 | 137 | 138 | {4aceda25-2a0e-47f1-a7e2-2324935cfd9d} 139 | NavigationSam 140 | 141 | 142 | 143 | 14.0 144 | 145 | 146 | 153 | -------------------------------------------------------------------------------- /Lib/NavigationSam.UWP/NavigationSamRenderer.cs: -------------------------------------------------------------------------------- 1 | using NavigationSam; 2 | using NavigationSam.UWP; 3 | using System; 4 | using Xamarin.Forms.Internals; 5 | using Xamarin.Forms.Platform.UWP; 6 | 7 | [assembly: ExportRenderer(typeof(NavigationPageSam), typeof(NavigationSamRenderer))] 8 | namespace NavigationSam.UWP 9 | { 10 | [Preserve(AllMembers = true)] 11 | public class NavigationSamRenderer : NavigationPageRenderer 12 | { 13 | [Obsolete("Xamarin.Forms team didn't make it possible to intercept the back button. Use OnBackButtonPressed from Page")] 14 | public static void Preserve() { } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Lib/NavigationSam.UWP/Preserver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace NavigationSam.UWP 8 | { 9 | public static class Preserver 10 | { 11 | [Obsolete("Xamarin.Forms team didn't make it possible to intercept the back button. Use OnBackButtonPressed from Page")] 12 | public static void Preserve() 13 | { 14 | NavigationPageSam.Preserve(); 15 | Utils.PopResult.Preserve(); 16 | NavigationSamRenderer.Preserve(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Lib/NavigationSam.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Общие сведения об этой сборке предоставляются следующим набором 6 | // набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, 7 | // связанные со сборкой. 8 | [assembly: AssemblyTitle("NavigationSam.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NavigationSam.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Сведения о версии для сборки состоят из следующих четырех значений: 18 | // 19 | // Основной номер версии 20 | // Дополнительный номер версии 21 | // Номер сборки 22 | // Номер редакции 23 | // 24 | // Можно задать все значения или принять номера сборки и редакции по умолчанию 25 | // используя "*", как показано ниже: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Lib/NavigationSam.UWP/Properties/NavigationSam.UWP.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Lib/NavigationSam.iOS/NavigationSam.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {a52b8a63-bc84-4b47-910d-692533484892} 11 | Library 12 | NavigationSam.iOS 13 | Resources 14 | NavigationSam.iOS 15 | PackageReference 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug 22 | DEBUG; 23 | prompt 24 | 4 25 | 26 | 27 | full 28 | true 29 | bin\Release 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 5.0.0.1874 48 | 49 | 50 | 51 | 52 | {4aceda25-2a0e-47f1-a7e2-2324935cfd9d} 53 | NavigationSam 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Lib/NavigationSam.iOS/NavigationSamRenderer.cs: -------------------------------------------------------------------------------- 1 | using CoreGraphics; 2 | using Foundation; 3 | using NavigationSam; 4 | using NavigationSam.iOS; 5 | using NavigationSam.Utils; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using UIKit; 12 | using Xamarin.Forms; 13 | using Xamarin.Forms.Internals; 14 | using Xamarin.Forms.Platform.iOS; 15 | 16 | [assembly: ExportRenderer(typeof(NavigationPageSam), typeof(NavigationSamRenderer))] 17 | namespace NavigationSam.iOS 18 | { 19 | [Xamarin.Forms.Internals.Preserve(AllMembers = true)] 20 | public class NavigationSamRenderer : NavigationRenderer, IUIGestureRecognizerDelegate 21 | { 22 | public static void Preserve() { } 23 | 24 | public NavigationSamRenderer() 25 | { 26 | } 27 | 28 | protected NavigationPageSam NavPage => Element as NavigationPageSam; 29 | protected bool IsIosOver14 => UIDevice.CurrentDevice.CheckSystemVersion(14, 0); 30 | 31 | public override void ViewDidLoad() 32 | { 33 | base.ViewDidLoad(); 34 | InteractivePopGestureRecognizer.Delegate = CreateGestureBackDelegate(); 35 | } 36 | 37 | // Software button back iOS 12 38 | [Export("navigationBar:didPushItem:")] 39 | public bool DidPushItem(UINavigationBar navigationBar, UINavigationItem item) 40 | { 41 | return OnDidPushItem(navigationBar, item); 42 | } 43 | 44 | // Software button back iOS 14 45 | public override UIViewController PopViewController(bool animated) 46 | { 47 | if (IsIosOver14) 48 | { 49 | Device.BeginInvokeOnMainThread(async () => 50 | { 51 | await NavPage.CatchBackButton(PopSources.SoftwareBackButton, new PopResult()); 52 | }); 53 | return null; 54 | } 55 | else 56 | { 57 | return base.PopViewController(animated); 58 | } 59 | } 60 | 61 | protected virtual bool OnDidPushItem(UINavigationBar navigationBar, UINavigationItem item) 62 | { 63 | if (IsIosOver14) 64 | return true; 65 | 66 | if (navigationBar.Items.Length > 1) 67 | { 68 | var view = navigationBar.Subviews[2].Subviews.FirstOrDefault(); 69 | int count = view.GestureRecognizers?.Length ?? 0; 70 | if (count > 0) 71 | for (int i = count; i > 0; i--) 72 | { 73 | var gesture = view.GestureRecognizers[i - 1]; 74 | view.RemoveGestureRecognizer(gesture); 75 | gesture.Dispose(); 76 | } 77 | 78 | var tap = new UITapGestureRecognizer(async () => 79 | { 80 | await NavPage.CatchBackButton(PopSources.SoftwareBackButton, new PopResult()); 81 | }); 82 | 83 | view.AddGestureRecognizer(tap); 84 | } 85 | 86 | return true; 87 | } 88 | 89 | protected virtual IUIGestureRecognizerDelegate CreateGestureBackDelegate() 90 | { 91 | var delegateBack = new SwipeBack(NavPage); 92 | return delegateBack; 93 | } 94 | } 95 | 96 | [Xamarin.Forms.Internals.Preserve(AllMembers = true)] 97 | public class SwipeBack : UIGestureRecognizerDelegate 98 | { 99 | private readonly NavigationPageSam navPage; 100 | 101 | public static void Preserve() { } 102 | 103 | public SwipeBack(NavigationPageSam navPage) 104 | { 105 | this.navPage = navPage; 106 | } 107 | 108 | // Swipe back 109 | public override bool ShouldBegin(UIGestureRecognizer recognizer) 110 | { 111 | if (!navPage.IsEnableGestureBackForIOS) 112 | return false; 113 | 114 | Device.BeginInvokeOnMainThread(async () => 115 | { 116 | await navPage.CatchBackButton(PopSources.SoftwareBackButton, new PopResult()); 117 | }); 118 | return false; 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /Lib/NavigationSam.iOS/Preserver.cs: -------------------------------------------------------------------------------- 1 | using Foundation; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using UIKit; 7 | 8 | namespace NavigationSam.iOS 9 | { 10 | public static class Preserver 11 | { 12 | public static void Preserve() 13 | { 14 | NavigationPageSam.Preserve(); 15 | Utils.PopResult.Preserve(); 16 | NavigationSamRenderer.Preserve(); 17 | SwipeBack.Preserve(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Lib/NavigationSam.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("NavigationSam.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("NavigationSam.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Lib/NavigationSam/INavigationPopInterceptor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | using Xamarin.Forms.Internals; 6 | 7 | namespace NavigationSam 8 | { 9 | [Preserve(AllMembers = true)] 10 | public interface INavigationPopInterceptor 11 | { 12 | /// 13 | /// Servise property for iOS 14 | /// 15 | bool IsPopRequest { get; set; } 16 | 17 | Task RequestPop(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Lib/NavigationSam/NavigationPageSam.cs: -------------------------------------------------------------------------------- 1 | using NavigationSam.Utils; 2 | using System; 3 | using System.Threading.Tasks; 4 | using Xamarin.Forms; 5 | using Xamarin.Forms.Internals; 6 | 7 | namespace NavigationSam 8 | { 9 | [Preserve(AllMembers = true)] 10 | public class NavigationPageSam : NavigationPage 11 | { 12 | public static void Preserve() { } 13 | 14 | public NavigationPageSam() : base() 15 | { 16 | } 17 | 18 | public NavigationPageSam(Page root) : base(root) 19 | { 20 | } 21 | 22 | public static readonly BindableProperty IsEnableGestureBackForIOSProperty = 23 | BindableProperty.Create( 24 | nameof(IsEnableGestureBackForIOS), 25 | typeof(bool), 26 | typeof(NavigationPageSam), 27 | true 28 | ); 29 | public bool IsEnableGestureBackForIOS 30 | { 31 | get => (bool)GetValue(IsEnableGestureBackForIOSProperty); 32 | set => SetValue(IsEnableGestureBackForIOSProperty, value); 33 | } 34 | 35 | public bool IsRequestAppearing { get; private set; } 36 | 37 | public virtual async Task CatchBackButton(PopSources popSource, PopResult popResult) 38 | { 39 | var page = GetDisplayPage(); 40 | if (page == null) 41 | return; 42 | 43 | // Get implement interface. Priority is Page 44 | INavigationPopInterceptor interceptor = null; 45 | if (page is INavigationPopInterceptor pageInterceptor && pageInterceptor != null) 46 | { 47 | interceptor = pageInterceptor; 48 | } 49 | else if (page.BindingContext is INavigationPopInterceptor vmInterceptor && vmInterceptor != null) 50 | { 51 | interceptor = vmInterceptor; 52 | } 53 | 54 | int count = GetNavigationCount(); 55 | // For iOS, we are ignore back button intercept for root page 56 | if (count == 1 && Device.RuntimePlatform == Device.iOS) 57 | { 58 | return; 59 | } 60 | 61 | if (interceptor != null) 62 | { 63 | if (IsRequestAppearing) 64 | return; 65 | 66 | IsRequestAppearing = true; 67 | bool res = await interceptor.RequestPop(); 68 | IsRequestAppearing = false; 69 | 70 | if (res) 71 | { 72 | if (popSource == PopSources.SoftwareBackButton) 73 | { 74 | await Pop(page, interceptor); 75 | } 76 | else 77 | { 78 | if (count == 1) 79 | { 80 | popResult.IsContinueHardwareButton = true; 81 | } 82 | else 83 | { 84 | await Pop(page, interceptor); 85 | } 86 | } 87 | } 88 | } 89 | else 90 | { 91 | if (popSource == PopSources.SoftwareBackButton) 92 | { 93 | await Pop(page, interceptor); 94 | } 95 | } 96 | } 97 | 98 | private async Task Pop(Page page, INavigationPopInterceptor interceptor) 99 | { 100 | if (interceptor != null) 101 | interceptor.IsPopRequest = true; 102 | 103 | if (IsModal(page)) 104 | await page.Navigation.PopModalAsync(); 105 | else 106 | await page.Navigation.PopAsync(); 107 | 108 | if (interceptor != null) 109 | interceptor.IsPopRequest = false; 110 | } 111 | 112 | private Page GetDisplayPage() 113 | { 114 | int modalCount = Navigation.ModalStack.Count; 115 | int navCount = Navigation.NavigationStack.Count; 116 | 117 | if (modalCount == 0 && navCount == 0) 118 | return null; 119 | 120 | if (modalCount > 0) 121 | { 122 | return Navigation.ModalStack[modalCount - 1]; 123 | } 124 | else 125 | { 126 | return Navigation.NavigationStack[navCount - 1]; 127 | } 128 | } 129 | 130 | private int GetNavigationCount() 131 | { 132 | int modalCount = Navigation.ModalStack.Count; 133 | int navCount = Navigation.NavigationStack.Count; 134 | 135 | return modalCount + navCount; 136 | } 137 | 138 | private bool IsModal(Page page) 139 | { 140 | for (int i = 0; i < page.Navigation.ModalStack.Count; i++) 141 | { 142 | if (page == page.Navigation.ModalStack[i]) 143 | return true; 144 | } 145 | return false; 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /Lib/NavigationSam/NavigationSam.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Lib/NavigationSam/Utils/PopResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Xamarin.Forms.Internals; 5 | 6 | namespace NavigationSam.Utils 7 | { 8 | [Preserve(AllMembers = true)] 9 | public class PopResult 10 | { 11 | public static void Preserve() { } 12 | 13 | public bool IsContinueHardwareButton { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Lib/NavigationSam/Utils/PopSources.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Xamarin.Forms.Internals; 5 | 6 | namespace NavigationSam.Utils 7 | { 8 | [Preserve(AllMembers = true)] 9 | public enum PopSources 10 | { 11 | HardwareBackButton, 12 | SoftwareBackButton, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /NavigationSam.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30804.86 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.UWP", "Sample\Sample.UWP\Sample.UWP.csproj", "{31E91A6D-4B70-43A2-99A2-FB8B21C78A82}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "Sample\Sample.Android\Sample.Android.csproj", "{BFF0E1B5-A87C-46F9-829D-84CF24114233}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS", "Sample\Sample.iOS\Sample.iOS.csproj", "{DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample", "Sample\Sample\Sample.csproj", "{E5589E54-CBB2-4C12-8CEE-4F665BD811BA}" 13 | EndProject 14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{E367C426-230E-4962-B113-C906D16E3155}" 15 | EndProject 16 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{59EAE415-D56B-45E6-8828-FADDBB2F10E2}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NavigationSam", "Lib\NavigationSam\NavigationSam.csproj", "{4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}" 19 | EndProject 20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NavigationSam.Droid", "Lib\NavigationSam.Droid\NavigationSam.Droid.csproj", "{79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}" 21 | EndProject 22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NavigationSam.iOS", "Lib\NavigationSam.iOS\NavigationSam.iOS.csproj", "{6B3D894D-6086-4034-A4A6-7DACD04AF6D3}" 23 | EndProject 24 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NavigationSam.UWP", "Lib\NavigationSam.UWP\NavigationSam.UWP.csproj", "{0D3FADEE-58E8-41A4-A5BD-D310EBE42942}" 25 | EndProject 26 | Global 27 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 28 | Debug|Any CPU = Debug|Any CPU 29 | Debug|ARM = Debug|ARM 30 | Debug|ARM64 = Debug|ARM64 31 | Debug|iPhone = Debug|iPhone 32 | Debug|iPhoneSimulator = Debug|iPhoneSimulator 33 | Debug|x64 = Debug|x64 34 | Debug|x86 = Debug|x86 35 | Release|Any CPU = Release|Any CPU 36 | Release|ARM = Release|ARM 37 | Release|ARM64 = Release|ARM64 38 | Release|iPhone = Release|iPhone 39 | Release|iPhoneSimulator = Release|iPhoneSimulator 40 | Release|x64 = Release|x64 41 | Release|x86 = Release|x86 42 | EndGlobalSection 43 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 44 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|Any CPU.ActiveCfg = Debug|x86 45 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|Any CPU.Build.0 = Debug|x86 46 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|Any CPU.Deploy.0 = Debug|x86 47 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|ARM.ActiveCfg = Debug|ARM 48 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|ARM.Build.0 = Debug|ARM 49 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|ARM.Deploy.0 = Debug|ARM 50 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|ARM64.ActiveCfg = Debug|x86 51 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhone.ActiveCfg = Debug|x86 52 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhone.Build.0 = Debug|x86 53 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhone.Deploy.0 = Debug|x86 54 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86 55 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhoneSimulator.Build.0 = Debug|x86 56 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86 57 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x64.ActiveCfg = Debug|x64 58 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x64.Build.0 = Debug|x64 59 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x64.Deploy.0 = Debug|x64 60 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x86.ActiveCfg = Debug|x86 61 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x86.Build.0 = Debug|x86 62 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Debug|x86.Deploy.0 = Debug|x86 63 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|Any CPU.ActiveCfg = Release|x86 64 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|Any CPU.Build.0 = Release|x86 65 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|Any CPU.Deploy.0 = Release|x86 66 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|ARM.ActiveCfg = Release|ARM 67 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|ARM.Build.0 = Release|ARM 68 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|ARM.Deploy.0 = Release|ARM 69 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|ARM64.ActiveCfg = Release|x86 70 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhone.ActiveCfg = Release|x86 71 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhone.Build.0 = Release|x86 72 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhone.Deploy.0 = Release|x86 73 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhoneSimulator.ActiveCfg = Release|x86 74 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhoneSimulator.Build.0 = Release|x86 75 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|iPhoneSimulator.Deploy.0 = Release|x86 76 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x64.ActiveCfg = Release|x64 77 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x64.Build.0 = Release|x64 78 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x64.Deploy.0 = Release|x64 79 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x86.ActiveCfg = Release|x86 80 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x86.Build.0 = Release|x86 81 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82}.Release|x86.Deploy.0 = Release|x86 82 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 83 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|Any CPU.Build.0 = Debug|Any CPU 84 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 85 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM.ActiveCfg = Debug|Any CPU 86 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM.Build.0 = Debug|Any CPU 87 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM.Deploy.0 = Debug|Any CPU 88 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM64.ActiveCfg = Debug|Any CPU 89 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM64.Build.0 = Debug|Any CPU 90 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|ARM64.Deploy.0 = Debug|Any CPU 91 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhone.ActiveCfg = Debug|Any CPU 92 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhone.Build.0 = Debug|Any CPU 93 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhone.Deploy.0 = Debug|Any CPU 94 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 95 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 96 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU 97 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x64.ActiveCfg = Debug|Any CPU 98 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x64.Build.0 = Debug|Any CPU 99 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x64.Deploy.0 = Debug|Any CPU 100 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x86.ActiveCfg = Debug|Any CPU 101 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x86.Build.0 = Debug|Any CPU 102 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Debug|x86.Deploy.0 = Debug|Any CPU 103 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|Any CPU.ActiveCfg = Release|Any CPU 104 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|Any CPU.Build.0 = Release|Any CPU 105 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|Any CPU.Deploy.0 = Release|Any CPU 106 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM.ActiveCfg = Release|Any CPU 107 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM.Build.0 = Release|Any CPU 108 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM.Deploy.0 = Release|Any CPU 109 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM64.ActiveCfg = Release|Any CPU 110 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM64.Build.0 = Release|Any CPU 111 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|ARM64.Deploy.0 = Release|Any CPU 112 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhone.ActiveCfg = Release|Any CPU 113 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhone.Build.0 = Release|Any CPU 114 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhone.Deploy.0 = Release|Any CPU 115 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 116 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 117 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU 118 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x64.ActiveCfg = Release|Any CPU 119 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x64.Build.0 = Release|Any CPU 120 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x64.Deploy.0 = Release|Any CPU 121 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x86.ActiveCfg = Release|Any CPU 122 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x86.Build.0 = Release|Any CPU 123 | {BFF0E1B5-A87C-46F9-829D-84CF24114233}.Release|x86.Deploy.0 = Release|Any CPU 124 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator 125 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator 126 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|Any CPU.Deploy.0 = Debug|iPhoneSimulator 127 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|ARM.ActiveCfg = Debug|iPhone 128 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|ARM.Build.0 = Debug|iPhone 129 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|ARM.Deploy.0 = Debug|iPhone 130 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|ARM64.ActiveCfg = Debug|iPhone 131 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhone.ActiveCfg = Debug|iPhone 132 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhone.Build.0 = Debug|iPhone 133 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhone.Deploy.0 = Debug|iPhone 134 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator 135 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator 136 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator 137 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator 138 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x64.Build.0 = Debug|iPhoneSimulator 139 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x64.Deploy.0 = Debug|iPhoneSimulator 140 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator 141 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x86.Build.0 = Debug|iPhoneSimulator 142 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Debug|x86.Deploy.0 = Debug|iPhoneSimulator 143 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator 144 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|Any CPU.Build.0 = Release|iPhoneSimulator 145 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|Any CPU.Deploy.0 = Release|iPhoneSimulator 146 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|ARM.ActiveCfg = Release|iPhoneSimulator 147 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|ARM.Build.0 = Release|iPhoneSimulator 148 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|ARM.Deploy.0 = Release|iPhoneSimulator 149 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|ARM64.ActiveCfg = Release|iPhone 150 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhone.ActiveCfg = Release|iPhone 151 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhone.Build.0 = Release|iPhone 152 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhone.Deploy.0 = Release|iPhone 153 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator 154 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator 155 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|iPhoneSimulator.Deploy.0 = Release|iPhoneSimulator 156 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x64.ActiveCfg = Release|iPhoneSimulator 157 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x64.Build.0 = Release|iPhoneSimulator 158 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x64.Deploy.0 = Release|iPhoneSimulator 159 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x86.ActiveCfg = Release|iPhoneSimulator 160 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x86.Build.0 = Release|iPhoneSimulator 161 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7}.Release|x86.Deploy.0 = Release|iPhoneSimulator 162 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 163 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|Any CPU.Build.0 = Debug|Any CPU 164 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 165 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|ARM.ActiveCfg = Debug|Any CPU 166 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|ARM.Build.0 = Debug|Any CPU 167 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|ARM.Deploy.0 = Debug|Any CPU 168 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|ARM64.ActiveCfg = Debug|Any CPU 169 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|ARM64.Build.0 = Debug|Any CPU 170 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhone.ActiveCfg = Debug|Any CPU 171 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhone.Build.0 = Debug|Any CPU 172 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhone.Deploy.0 = Debug|Any CPU 173 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 174 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 175 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU 176 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x64.ActiveCfg = Debug|Any CPU 177 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x64.Build.0 = Debug|Any CPU 178 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x64.Deploy.0 = Debug|Any CPU 179 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x86.ActiveCfg = Debug|Any CPU 180 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x86.Build.0 = Debug|Any CPU 181 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Debug|x86.Deploy.0 = Debug|Any CPU 182 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|Any CPU.ActiveCfg = Release|Any CPU 183 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|Any CPU.Build.0 = Release|Any CPU 184 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|Any CPU.Deploy.0 = Release|Any CPU 185 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|ARM.ActiveCfg = Release|Any CPU 186 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|ARM.Build.0 = Release|Any CPU 187 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|ARM.Deploy.0 = Release|Any CPU 188 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|ARM64.ActiveCfg = Release|Any CPU 189 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|ARM64.Build.0 = Release|Any CPU 190 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhone.ActiveCfg = Release|Any CPU 191 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhone.Build.0 = Release|Any CPU 192 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhone.Deploy.0 = Release|Any CPU 193 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 194 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 195 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU 196 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x64.ActiveCfg = Release|Any CPU 197 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x64.Build.0 = Release|Any CPU 198 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x64.Deploy.0 = Release|Any CPU 199 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x86.ActiveCfg = Release|Any CPU 200 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x86.Build.0 = Release|Any CPU 201 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA}.Release|x86.Deploy.0 = Release|Any CPU 202 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 203 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|Any CPU.Build.0 = Debug|Any CPU 204 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|ARM.ActiveCfg = Debug|Any CPU 205 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|ARM.Build.0 = Debug|Any CPU 206 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|ARM64.ActiveCfg = Debug|Any CPU 207 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|ARM64.Build.0 = Debug|Any CPU 208 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|iPhone.ActiveCfg = Debug|Any CPU 209 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|iPhone.Build.0 = Debug|Any CPU 210 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 211 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 212 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|x64.ActiveCfg = Debug|Any CPU 213 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|x64.Build.0 = Debug|Any CPU 214 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|x86.ActiveCfg = Debug|Any CPU 215 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Debug|x86.Build.0 = Debug|Any CPU 216 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|Any CPU.ActiveCfg = Release|Any CPU 217 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|Any CPU.Build.0 = Release|Any CPU 218 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|ARM.ActiveCfg = Release|Any CPU 219 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|ARM.Build.0 = Release|Any CPU 220 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|ARM64.ActiveCfg = Release|Any CPU 221 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|ARM64.Build.0 = Release|Any CPU 222 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|iPhone.ActiveCfg = Release|Any CPU 223 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|iPhone.Build.0 = Release|Any CPU 224 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 225 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 226 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|x64.ActiveCfg = Release|Any CPU 227 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|x64.Build.0 = Release|Any CPU 228 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|x86.ActiveCfg = Release|Any CPU 229 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D}.Release|x86.Build.0 = Release|Any CPU 230 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 231 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU 232 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|ARM.ActiveCfg = Debug|Any CPU 233 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|ARM.Build.0 = Debug|Any CPU 234 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|ARM64.ActiveCfg = Debug|Any CPU 235 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|ARM64.Build.0 = Debug|Any CPU 236 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|iPhone.ActiveCfg = Debug|Any CPU 237 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|iPhone.Build.0 = Debug|Any CPU 238 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 239 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 240 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|x64.ActiveCfg = Debug|Any CPU 241 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|x64.Build.0 = Debug|Any CPU 242 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|x86.ActiveCfg = Debug|Any CPU 243 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Debug|x86.Build.0 = Debug|Any CPU 244 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU 245 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|Any CPU.Build.0 = Release|Any CPU 246 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|ARM.ActiveCfg = Release|Any CPU 247 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|ARM.Build.0 = Release|Any CPU 248 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|ARM64.ActiveCfg = Release|Any CPU 249 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|ARM64.Build.0 = Release|Any CPU 250 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|iPhone.ActiveCfg = Release|Any CPU 251 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|iPhone.Build.0 = Release|Any CPU 252 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 253 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 254 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|x64.ActiveCfg = Release|Any CPU 255 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|x64.Build.0 = Release|Any CPU 256 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|x86.ActiveCfg = Release|Any CPU 257 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E}.Release|x86.Build.0 = Release|Any CPU 258 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 259 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|Any CPU.Build.0 = Debug|Any CPU 260 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|ARM.ActiveCfg = Debug|Any CPU 261 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|ARM.Build.0 = Debug|Any CPU 262 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|ARM64.ActiveCfg = Debug|Any CPU 263 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|ARM64.Build.0 = Debug|Any CPU 264 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|iPhone.ActiveCfg = Debug|Any CPU 265 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|iPhone.Build.0 = Debug|Any CPU 266 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 267 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 268 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|x64.ActiveCfg = Debug|Any CPU 269 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|x64.Build.0 = Debug|Any CPU 270 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|x86.ActiveCfg = Debug|Any CPU 271 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Debug|x86.Build.0 = Debug|Any CPU 272 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|Any CPU.ActiveCfg = Release|Any CPU 273 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|Any CPU.Build.0 = Release|Any CPU 274 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|ARM.ActiveCfg = Release|Any CPU 275 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|ARM.Build.0 = Release|Any CPU 276 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|ARM64.ActiveCfg = Release|Any CPU 277 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|ARM64.Build.0 = Release|Any CPU 278 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|iPhone.ActiveCfg = Release|Any CPU 279 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|iPhone.Build.0 = Release|Any CPU 280 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 281 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 282 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|x64.ActiveCfg = Release|Any CPU 283 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|x64.Build.0 = Release|Any CPU 284 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|x86.ActiveCfg = Release|Any CPU 285 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3}.Release|x86.Build.0 = Release|Any CPU 286 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 287 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|Any CPU.Build.0 = Debug|Any CPU 288 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|ARM.ActiveCfg = Debug|ARM 289 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|ARM.Build.0 = Debug|ARM 290 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|ARM64.ActiveCfg = Debug|ARM64 291 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|ARM64.Build.0 = Debug|ARM64 292 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|iPhone.ActiveCfg = Debug|Any CPU 293 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|iPhone.Build.0 = Debug|Any CPU 294 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU 295 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU 296 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|x64.ActiveCfg = Debug|x64 297 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|x64.Build.0 = Debug|x64 298 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|x86.ActiveCfg = Debug|x86 299 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Debug|x86.Build.0 = Debug|x86 300 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|Any CPU.ActiveCfg = Release|Any CPU 301 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|Any CPU.Build.0 = Release|Any CPU 302 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|ARM.ActiveCfg = Release|ARM 303 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|ARM.Build.0 = Release|ARM 304 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|ARM64.ActiveCfg = Release|ARM64 305 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|ARM64.Build.0 = Release|ARM64 306 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|iPhone.ActiveCfg = Release|Any CPU 307 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|iPhone.Build.0 = Release|Any CPU 308 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU 309 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|iPhoneSimulator.Build.0 = Release|Any CPU 310 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|x64.ActiveCfg = Release|x64 311 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|x64.Build.0 = Release|x64 312 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|x86.ActiveCfg = Release|x86 313 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942}.Release|x86.Build.0 = Release|x86 314 | EndGlobalSection 315 | GlobalSection(SolutionProperties) = preSolution 316 | HideSolutionNode = FALSE 317 | EndGlobalSection 318 | GlobalSection(NestedProjects) = preSolution 319 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82} = {E367C426-230E-4962-B113-C906D16E3155} 320 | {BFF0E1B5-A87C-46F9-829D-84CF24114233} = {E367C426-230E-4962-B113-C906D16E3155} 321 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7} = {E367C426-230E-4962-B113-C906D16E3155} 322 | {E5589E54-CBB2-4C12-8CEE-4F665BD811BA} = {E367C426-230E-4962-B113-C906D16E3155} 323 | {4ACEDA25-2A0E-47F1-A7E2-2324935CFD9D} = {59EAE415-D56B-45E6-8828-FADDBB2F10E2} 324 | {79D01D5A-29C3-4E4B-BCCC-B76359CC7E4E} = {59EAE415-D56B-45E6-8828-FADDBB2F10E2} 325 | {6B3D894D-6086-4034-A4A6-7DACD04AF6D3} = {59EAE415-D56B-45E6-8828-FADDBB2F10E2} 326 | {0D3FADEE-58E8-41A4-A5BD-D310EBE42942} = {59EAE415-D56B-45E6-8828-FADDBB2F10E2} 327 | EndGlobalSection 328 | GlobalSection(ExtensibilityGlobals) = postSolution 329 | SolutionGuid = {6EA3BC72-6CA9-408F-A213-3909D6B782A6} 330 | EndGlobalSection 331 | EndGlobal 332 | -------------------------------------------------------------------------------- /Nuget/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Nuget/1.gif -------------------------------------------------------------------------------- /Nuget/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Nuget/2.gif -------------------------------------------------------------------------------- /Nuget/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Nuget/3.gif -------------------------------------------------------------------------------- /Nuget/NavigationSam.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NavigationSam 5 | 2.1.2 6 | Boris Krit 7 | Allows intercept navigation back by user for Xamarin.Forms 8 | NavigationSam 9 | 10 | MIT 11 | https://github.com/scriptboris/NavigationSam 12 | images\icon.png 13 | false 14 | Copyright 2019 15 | xamarin xamarin-forms navigation override back intercept 16 | 17 | 18 | 19 | 20 | 21 | - Fixed NavigationSamRenderer for iOS 12. Now impement native GestureRecognizer that custom back button 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 | -------------------------------------------------------------------------------- /Nuget/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Nuget/icon.png -------------------------------------------------------------------------------- /Nuget/nuget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Nuget/nuget.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NavigationSam 2 | Allows can intercept navigation back by user for Xamarin.Forms 3 | 4 | ## Nuget Installation 5 | https://www.nuget.org/packages/NavigationSam 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
DroidiOSUWP
23 | 24 | ## Supported Platforms 25 | - Android 26 | - iOS 27 | - UWP not support (use native method OnBackButtonPressed, see example) 28 | 29 | 30 | ## Install android project 31 | ```c# 32 | // Pay attention to the inherited class!!! FormsAppCompatActivitySam 33 | public class MainActivity : global::NavigationSam.Droid.FormsAppCompatActivitySam 34 | { 35 | protected override void OnCreate(Bundle savedInstanceState) 36 | { 37 | TabLayoutResource = Resource.Layout.Tabbar; 38 | ToolbarResource = Resource.Layout.Toolbar; 39 | 40 | base.OnCreate(savedInstanceState); 41 | 42 | NavigationSam.Droid.Preserver.Preserve(); 43 | Xamarin.Forms.Forms.Init(this, savedInstanceState); 44 | LoadApplication(new App()); 45 | } 46 | } 47 | ``` 48 | 49 | ## Install iOS project 50 | ```c# 51 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 52 | { 53 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 54 | { 55 | global::Xamarin.Forms.Forms.Init(); 56 | LoadApplication(new App()); 57 | 58 | NavigationSam.iOS.Preserver.Preserve(); 59 | 60 | return base.FinishedLaunching(app, options); 61 | } 62 | } 63 | ``` 64 | 65 | # Example 66 | For Xamarin.Forms entry point 67 | ```c# 68 | public partial class App : Application 69 | { 70 | InitializeComponent(); 71 | MainPage = new NavigationPageSam(new MainPage()); 72 | } 73 | ``` 74 | For pages 75 | ```c# 76 | public partial class SamplePage : ContentPage, INavigationPopInterceptor 77 | { 78 | public SamplePage() 79 | { 80 | InitializeComponent(); 81 | } 82 | 83 | // Important service property 84 | public bool IsPopRequest { get; set; } 85 | 86 | public async Task RequestPop() 87 | { 88 | bool res = true; 89 | 90 | if (CheckChanges()) 91 | res = await DisplayAlert("Warning", 92 | "If you exit, all unsaved changes will be lost", 93 | "Exit", "Cancel"); 94 | 95 | return res; 96 | } 97 | 98 | // For UWP 99 | protected override bool OnBackButtonPressed() 100 | { 101 | Device.BeginInvokeOnMainThread(async () => 102 | { 103 | bool res = await RequestPop(); 104 | if (res) 105 | await Navigation.PopAsync(); 106 | }); 107 | return true; 108 | } 109 | } 110 | ``` 111 | 112 | # Example MVVM 113 | Same as above. 114 | INavigationPopInterceptor can implement to ViewModel 115 | 116 | Warning: for UWP need realization method OnBackButtonPressed for Page. For detail see Sample project 117 | ```c# 118 | public class SampleVm : BaseViewModel, INavigationPopInterceptor 119 | { 120 | public SampleVm() 121 | { 122 | //Do something... 123 | } 124 | 125 | // Important service property 126 | public bool IsPopRequest { get; set; } 127 | 128 | public async Task RequestPop() 129 | { 130 | bool res = true; 131 | 132 | if (CheckChanges()) 133 | res = await Page.DisplayAlert("Warning", 134 | "If you exit, all unsaved changes will be lost", 135 | "Exit", "Cancel"); 136 | 137 | return res; 138 | } 139 | } 140 | ``` 141 | ## License 142 | 143 | MIT Licensed 144 | 145 | ## Donation 146 | If this project help you reduce time to develop, you can give me a cup of coffee :) :coffee: :pizza: 147 | 148 | [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/scriptboris?locale.x=ru_RU) 149 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /Sample/Sample.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content.PM; 5 | using Android.Runtime; 6 | using Android.Views; 7 | using Android.Widget; 8 | using Android.OS; 9 | using NavigationSam.Droid; 10 | 11 | namespace Sample.Droid 12 | { 13 | [Activity(Label = "Sample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 14 | public class MainActivity : FormsAppCompatActivitySam 15 | { 16 | protected override void OnCreate(Bundle savedInstanceState) 17 | { 18 | TabLayoutResource = Resource.Layout.Tabbar; 19 | ToolbarResource = Resource.Layout.Toolbar; 20 | 21 | base.OnCreate(savedInstanceState); 22 | 23 | NavigationSam.Droid.Preserver.Preserve(); 24 | Xamarin.Essentials.Platform.Init(this, savedInstanceState); 25 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState); 26 | LoadApplication(new App()); 27 | } 28 | 29 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) 30 | { 31 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); 32 | 33 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Sample/Sample.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("Sample.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("Sample.Android")] 14 | [assembly: AssemblyCopyright("Copyright © 2014")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | [assembly: AssemblyVersion("1.0.0.0")] 26 | [assembly: AssemblyFileVersion("1.0.0.0")] 27 | 28 | // Add some common permissions, these can be removed if not needed 29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)] 30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] 31 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.xml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable-hdpi/ 12 | icon.png 13 | 14 | drawable-ldpi/ 15 | icon.png 16 | 17 | drawable-mdpi/ 18 | icon.png 19 | 20 | layout/ 21 | main.xml 22 | 23 | values/ 24 | strings.xml 25 | 26 | In order to get the build system to recognize Android resources, set the build action to 27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 28 | instead operate on resource IDs. When you compile an Android application that uses resources, 29 | the build system will package the resources for distribution and generate a class called 30 | "Resource" that contains the tokens for each one of the resources included. For example, 31 | for the above Resources layout, this is what the Resource class would expose: 32 | 33 | public class Resource { 34 | public class drawable { 35 | public const int icon = 0x123; 36 | } 37 | 38 | public class layout { 39 | public const int main = 0x456; 40 | } 41 | 42 | public class strings { 43 | public const int first_string = 0xabc; 44 | public const int second_string = 0xbcd; 45 | } 46 | } 47 | 48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main 49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first 50 | string in the dictionary file values/strings.xml. 51 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/layout/Tabbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/layout/Toolbar.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-anydpi-v26/icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-anydpi-v26/icon_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-hdpi/icon.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-hdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-hdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-mdpi/icon.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-mdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-mdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xhdpi/icon.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xxhdpi/icon.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xxxhdpi/icon.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #3F51B5 5 | #303F9F 6 | #FF4081 7 | 8 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Resources/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 26 | 27 | 30 | -------------------------------------------------------------------------------- /Sample/Sample.Android/Sample.Android.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {BFF0E1B5-A87C-46F9-829D-84CF24114233} 7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df} 9 | Library 10 | Sample.Droid 11 | Sample.Android 12 | True 13 | True 14 | Resources\Resource.designer.cs 15 | Resource 16 | Properties\AndroidManifest.xml 17 | Resources 18 | Assets 19 | false 20 | v10.0 21 | true 22 | true 23 | Xamarin.Android.Net.AndroidClientHandler 24 | 25 | 26 | 27 | 28 | true 29 | portable 30 | false 31 | bin\Debug 32 | DEBUG; 33 | prompt 34 | 4 35 | None 36 | false 37 | false 38 | false 39 | false 40 | 41 | 42 | true 43 | portable 44 | true 45 | bin\Release 46 | prompt 47 | 4 48 | true 49 | false 50 | false 51 | false 52 | false 53 | false 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 | {79d01d5a-29c3-4e4b-bccc-b76359cc7e4e} 102 | NavigationSam.Droid 103 | 104 | 105 | {7F4AAFCC-841B-4A17-8F85-7D72F331F237} 106 | Sample 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample/Sample.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 Sample.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 | #if DEBUG 43 | if (System.Diagnostics.Debugger.IsAttached) 44 | { 45 | this.DebugSettings.EnableFrameRateCounter = true; 46 | } 47 | #endif 48 | 49 | Frame rootFrame = Window.Current.Content as Frame; 50 | 51 | // Do not repeat app initialization when the Window already has content, 52 | // just ensure that the window is active 53 | if (rootFrame == null) 54 | { 55 | // Create a Frame to act as the navigation context and navigate to the first page 56 | rootFrame = new Frame(); 57 | 58 | rootFrame.NavigationFailed += OnNavigationFailed; 59 | 60 | Xamarin.Forms.Forms.Init(e); 61 | 62 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 63 | { 64 | //TODO: Load state from previously suspended application 65 | } 66 | 67 | // Place the frame in the current Window 68 | Window.Current.Content = rootFrame; 69 | } 70 | 71 | if (rootFrame.Content == null) 72 | { 73 | // When the navigation stack isn't restored navigate to the first page, 74 | // configuring the new page by passing required information as a navigation 75 | // parameter 76 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 77 | } 78 | // Ensure the current window is active 79 | Window.Current.Activate(); 80 | } 81 | 82 | /// 83 | /// Invoked when Navigation to a certain page fails 84 | /// 85 | /// The Frame which failed navigation 86 | /// Details about the navigation failure 87 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 88 | { 89 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 90 | } 91 | 92 | /// 93 | /// Invoked when application execution is being suspended. Application state is saved 94 | /// without knowing whether the application will be terminated or resumed with the contents 95 | /// of memory still intact. 96 | /// 97 | /// The source of the suspend request. 98 | /// Details about the suspend request. 99 | private void OnSuspending(object sender, SuspendingEventArgs e) 100 | { 101 | var deferral = e.SuspendingOperation.GetDeferral(); 102 | //TODO: Save application state and stop any background activity 103 | deferral.Complete(); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.UWP/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /Sample/Sample.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/MainPage.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.Foundation; 7 | using Windows.Foundation.Collections; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | using Windows.UI.Xaml.Controls.Primitives; 11 | using Windows.UI.Xaml.Data; 12 | using Windows.UI.Xaml.Input; 13 | using Windows.UI.Xaml.Media; 14 | using Windows.UI.Xaml.Navigation; 15 | 16 | namespace Sample.UWP 17 | { 18 | public sealed partial class MainPage 19 | { 20 | public MainPage() 21 | { 22 | this.InitializeComponent(); 23 | 24 | LoadApplication(new Sample.App()); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | Sample.UWP 18 | 77f12611-9178-4f02-922d-96392846cfcd 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /Sample/Sample.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Sample/Sample.UWP/Sample.UWP.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | {31E91A6D-4B70-43A2-99A2-FB8B21C78A82} 8 | AppContainerExe 9 | Properties 10 | Sample.UWP 11 | Sample.UWP 12 | en-US 13 | UAP 14 | 10.0.18362.0 15 | 10.0.17763.0 16 | 14 17 | true 18 | 512 19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 20 | false 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 | App.xaml 94 | 95 | 96 | MainPage.xaml 97 | 98 | 99 | 100 | 101 | 102 | Designer 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 | MSBuild:Compile 138 | Designer 139 | 140 | 141 | MSBuild:Compile 142 | Designer 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | {0d3fadee-58e8-41a4-a5bd-d310ebe42942} 153 | NavigationSam.UWP 154 | 155 | 156 | {7F4AAFCC-841B-4A17-8F85-7D72F331F237} 157 | Sample 158 | 159 | 160 | 161 | 14.0 162 | 163 | 164 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/AppDelegate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace Sample.iOS 9 | { 10 | // The UIApplicationDelegate for the application. This class is responsible for launching the 11 | // User Interface of the application, as well as listening (and optionally responding) to 12 | // application events from iOS. 13 | [Register("AppDelegate")] 14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate 15 | { 16 | // 17 | // This method is invoked when the application has loaded and is ready to run. In this 18 | // method you should instantiate the window, load the UI into it and then make the window 19 | // visible. 20 | // 21 | // You have 17 seconds to return from this method, or iOS will terminate your application. 22 | // 23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options) 24 | { 25 | NavigationSam.iOS.Preserver.Preserve(); 26 | global::Xamarin.Forms.Forms.Init(); 27 | LoadApplication(new App()); 28 | 29 | return base.FinishedLaunching(app, options); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "scale": "2x", 5 | "size": "20x20", 6 | "idiom": "iphone", 7 | "filename": "Icon40.png" 8 | }, 9 | { 10 | "scale": "3x", 11 | "size": "20x20", 12 | "idiom": "iphone", 13 | "filename": "Icon60.png" 14 | }, 15 | { 16 | "scale": "2x", 17 | "size": "29x29", 18 | "idiom": "iphone", 19 | "filename": "Icon58.png" 20 | }, 21 | { 22 | "scale": "3x", 23 | "size": "29x29", 24 | "idiom": "iphone", 25 | "filename": "Icon87.png" 26 | }, 27 | { 28 | "scale": "2x", 29 | "size": "40x40", 30 | "idiom": "iphone", 31 | "filename": "Icon80.png" 32 | }, 33 | { 34 | "scale": "3x", 35 | "size": "40x40", 36 | "idiom": "iphone", 37 | "filename": "Icon120.png" 38 | }, 39 | { 40 | "scale": "2x", 41 | "size": "60x60", 42 | "idiom": "iphone", 43 | "filename": "Icon120.png" 44 | }, 45 | { 46 | "scale": "3x", 47 | "size": "60x60", 48 | "idiom": "iphone", 49 | "filename": "Icon180.png" 50 | }, 51 | { 52 | "scale": "1x", 53 | "size": "20x20", 54 | "idiom": "ipad", 55 | "filename": "Icon20.png" 56 | }, 57 | { 58 | "scale": "2x", 59 | "size": "20x20", 60 | "idiom": "ipad", 61 | "filename": "Icon40.png" 62 | }, 63 | { 64 | "scale": "1x", 65 | "size": "29x29", 66 | "idiom": "ipad", 67 | "filename": "Icon29.png" 68 | }, 69 | { 70 | "scale": "2x", 71 | "size": "29x29", 72 | "idiom": "ipad", 73 | "filename": "Icon58.png" 74 | }, 75 | { 76 | "scale": "1x", 77 | "size": "40x40", 78 | "idiom": "ipad", 79 | "filename": "Icon40.png" 80 | }, 81 | { 82 | "scale": "2x", 83 | "size": "40x40", 84 | "idiom": "ipad", 85 | "filename": "Icon80.png" 86 | }, 87 | { 88 | "scale": "1x", 89 | "size": "76x76", 90 | "idiom": "ipad", 91 | "filename": "Icon76.png" 92 | }, 93 | { 94 | "scale": "2x", 95 | "size": "76x76", 96 | "idiom": "ipad", 97 | "filename": "Icon152.png" 98 | }, 99 | { 100 | "scale": "2x", 101 | "size": "83.5x83.5", 102 | "idiom": "ipad", 103 | "filename": "Icon167.png" 104 | }, 105 | { 106 | "scale": "1x", 107 | "size": "1024x1024", 108 | "idiom": "ios-marketing", 109 | "filename": "Icon1024.png" 110 | } 111 | ], 112 | "properties": {}, 113 | "info": { 114 | "version": 1, 115 | "author": "xcode" 116 | } 117 | } -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Entitlements.plist: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIDeviceFamily 6 | 7 | 1 8 | 2 9 | 10 | UISupportedInterfaceOrientations 11 | 12 | UIInterfaceOrientationPortrait 13 | UIInterfaceOrientationLandscapeLeft 14 | UIInterfaceOrientationLandscapeRight 15 | 16 | UISupportedInterfaceOrientations~ipad 17 | 18 | UIInterfaceOrientationPortrait 19 | UIInterfaceOrientationPortraitUpsideDown 20 | UIInterfaceOrientationLandscapeLeft 21 | UIInterfaceOrientationLandscapeRight 22 | 23 | MinimumOSVersion 24 | 8.0 25 | CFBundleDisplayName 26 | Sample 27 | CFBundleIdentifier 28 | com.companyname.Sample 29 | CFBundleVersion 30 | 1.0 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | CFBundleName 34 | Sample 35 | XSAppIconAssets 36 | Assets.xcassets/AppIcon.appiconset 37 | 38 | 39 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | using Foundation; 6 | using UIKit; 7 | 8 | namespace Sample.iOS 9 | { 10 | public class Application 11 | { 12 | // This is the main entry point of the application. 13 | static void Main(string[] args) 14 | { 15 | // if you want to use a different Application Delegate class from "AppDelegate" 16 | // you can specify it here. 17 | UIApplication.Main(args, null, "AppDelegate"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Sample.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Sample.iOS")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Resources/Default-568h@2x.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Resources/Default-Portrait.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Resources/Default-Portrait@2x.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Resources/Default.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scriptBoris/NavigationSam/7fe278db28f9a66439c20021228d13d03190667a/Sample/Sample.iOS/Resources/Default@2x.png -------------------------------------------------------------------------------- /Sample/Sample.iOS/Resources/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 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 | -------------------------------------------------------------------------------- /Sample/Sample.iOS/Sample.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | iPhoneSimulator 6 | 8.0.30703 7 | 2.0 8 | {DE4CFFDD-9B0F-44B5-8E11-5F00CE1D1FB7} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | {6143fdea-f3c2-4a09-aafa-6e230626515e} 11 | Exe 12 | Sample.iOS 13 | Resources 14 | Sample.iOS 15 | true 16 | NSUrlSessionHandler 17 | manual 18 | 19 | 20 | true 21 | full 22 | false 23 | bin\iPhoneSimulator\Debug 24 | DEBUG 25 | prompt 26 | 4 27 | x86_64 28 | None 29 | true 30 | Apple Development: Борис Крит (75YS6LM4DA) 31 | VS: WildCard Development 32 | 33 | 34 | none 35 | true 36 | bin\iPhoneSimulator\Release 37 | prompt 38 | 4 39 | None 40 | x86_64 41 | 42 | 43 | true 44 | full 45 | false 46 | bin\iPhone\Debug 47 | DEBUG 48 | prompt 49 | 4 50 | ARM64 51 | Apple Development: Борис Крит (75YS6LM4DA) 52 | true 53 | Entitlements.plist 54 | None 55 | -all 56 | VS: WildCard Development 57 | 58 | 59 | none 60 | true 61 | bin\iPhone\Release 62 | prompt 63 | 4 64 | ARM64 65 | iPhone Developer 66 | Entitlements.plist 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | false 79 | 80 | 81 | false 82 | 83 | 84 | false 85 | 86 | 87 | false 88 | 89 | 90 | false 91 | 92 | 93 | false 94 | 95 | 96 | false 97 | 98 | 99 | false 100 | 101 | 102 | false 103 | 104 | 105 | false 106 | 107 | 108 | false 109 | 110 | 111 | false 112 | 113 | 114 | false 115 | 116 | 117 | false 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | {6b3d894d-6086-4034-a4a6-7dacd04af6d3} 136 | NavigationSam.iOS 137 | false 138 | false 139 | 140 | 141 | {7F4AAFCC-841B-4A17-8F85-7D72F331F237} 142 | Sample 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /Sample/Sample/App.xaml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | -------------------------------------------------------------------------------- /Sample/Sample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using NavigationSam; 2 | using System; 3 | using Xamarin.Forms; 4 | using Xamarin.Forms.Xaml; 5 | 6 | namespace Sample 7 | { 8 | public partial class App : Application 9 | { 10 | public App() 11 | { 12 | InitializeComponent(); 13 | 14 | var master = new MasterPage(); 15 | 16 | if (Device.RuntimePlatform == Device.UWP) 17 | master.MasterBehavior = MasterBehavior.Popover; 18 | 19 | MainPage = master; 20 | } 21 | 22 | public static User CurrentUser { get; set; } = new User(); 23 | 24 | protected override void OnStart() 25 | { 26 | } 27 | 28 | protected override void OnSleep() 29 | { 30 | } 31 | 32 | protected override void OnResume() 33 | { 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sample/Sample/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xamarin.Forms.Xaml; 2 | 3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -------------------------------------------------------------------------------- /Sample/Sample/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /Sample/Sample/FodyWeavers.xsd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Used to control if the On_PropertyName_Changed feature is enabled. 12 | 13 | 14 | 15 | 16 | Used to control if the Dependent properties feature is enabled. 17 | 18 | 19 | 20 | 21 | Used to control if the IsChanged property feature is enabled. 22 | 23 | 24 | 25 | 26 | Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form. 27 | 28 | 29 | 30 | 31 | Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project. 32 | 33 | 34 | 35 | 36 | Used to control if equality checks should use the Equals method resolved from the base class. 37 | 38 | 39 | 40 | 41 | Used to control if equality checks should use the static Equals method resolved from the base class. 42 | 43 | 44 | 45 | 46 | Used to turn off build warnings from this weaver. 47 | 48 | 49 | 50 | 51 | Used to turn off build warnings about mismatched On_PropertyName_Changed methods. 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. 60 | 61 | 62 | 63 | 64 | A comma-separated list of error codes that can be safely ignored in assembly verification. 65 | 66 | 67 | 68 | 69 | 'false' to turn off automatic generation of the XML Schema file. 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /Sample/Sample/MasterPage.xaml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 8 | 9 |