├── .gitignore ├── LICENSE ├── README.md ├── SlideOverKit.Droid ├── ISlideOverKitPageRendererDroid.cs ├── MenuContainerPageDroidRenderer.cs ├── Resources │ └── Resource.designer.cs ├── SlideMenuDroidRenderer.cs ├── SlideOverKit.Droid.csproj ├── SlideOverKitDroidHandler.cs ├── SlidePopupViewRendererDroid.cs └── packages.config ├── SlideOverKit.UWP ├── ISlideOverKitPageRendererUWP.cs ├── MenuContainerPageUWPRenderer.cs ├── Properties │ ├── AssemblyInfo.cs │ └── SlideOverKit.UWP.rd.xml ├── SlideOverKit.UWP.csproj ├── SlideOverKitUWPHandler.cs └── project.json ├── SlideOverKit.iOS ├── ISlideOverKitPageRendereriOS.cs ├── MenuContainerPageiOSRenderer.cs ├── Properties │ └── AssemblyInfo.cs ├── SlideOVerKit.cs ├── SlideOverKit.iOS.csproj ├── SlideOverKitiOSHandler.cs ├── SlidePopupViewRendereriOS.cs └── packages.config ├── SlideOverKit.nuspec ├── SlideOverKit.sln ├── SlideOverKit ├── Gestures │ ├── DragGestureFactory.cs │ ├── HorizontalGestures.cs │ ├── IDragGesture.cs │ └── VerticalGestures.cs ├── IMenuContainerPage.cs ├── IPopupContainerPage.cs ├── MenuContainerPage.cs ├── PopupViewAttached.cs ├── ScreenSizeHelper.cs ├── SlideMenuView.cs ├── SlideOverKit.csproj └── SlidePopupView.cs ├── SlideOverKitMoreSamples ├── Droid │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Renderer │ │ └── PageImpInterfaceRendererDroid.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── Resource.designer.cs │ │ ├── drawable-hdpi │ │ │ └── icon.png │ │ ├── drawable-xhdpi │ │ │ └── icon.png │ │ ├── drawable-xxhdpi │ │ │ └── icon.png │ │ └── drawable │ │ │ ├── About_Blue.png │ │ │ ├── Battery_Blue.png │ │ │ ├── Chat_Blue.png │ │ │ ├── CommandLine_Blue.png │ │ │ ├── DoubleDown_Black.png │ │ │ ├── DoubleDown_Blue.png │ │ │ ├── DoubleDown_White.png │ │ │ ├── DoubleLeft.png │ │ │ ├── DoubleRight.png │ │ │ ├── DoubleUp.png │ │ │ ├── Enter.png │ │ │ ├── Filter_Blue.png │ │ │ ├── Happy.png │ │ │ ├── Home.png │ │ │ ├── Map_Background.png │ │ │ ├── MessageFilled.png │ │ │ ├── Microphone.png │ │ │ ├── MoneyBag_Blue.png │ │ │ ├── Pencil.png │ │ │ ├── Report_Blue.png │ │ │ ├── Save_Blue.png │ │ │ ├── Settings.png │ │ │ ├── Timeline_Blue.png │ │ │ ├── USBConnected_Color.png │ │ │ ├── UpIcon.png │ │ │ ├── VideoCall.png │ │ │ ├── dog.jpg │ │ │ ├── icon.png │ │ │ └── xamconsulting.png │ ├── SlideOverKit.MoreSample.Droid.csproj │ └── packages.config ├── SlideOverKit.MoreSample.UWP │ ├── About_Blue.png │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── Battery_Blue.png │ ├── Chat_Blue.png │ ├── CommandLine_Blue.png │ ├── DoubleDown_Black.png │ ├── DoubleDown_Blue.png │ ├── DoubleDown_White.png │ ├── DoubleLeft.png │ ├── DoubleRight.png │ ├── DoubleUp.png │ ├── Enter.png │ ├── Filter_Blue.png │ ├── Happy.png │ ├── Home.png │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── MessageFilled.png │ ├── Microphone.png │ ├── MoneyBag_Blue.png │ ├── Package.appxmanifest │ ├── Pencil.png │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── Renderer │ │ └── PageImpInterfaceRendereUWP.cs │ ├── Report_Blue.png │ ├── Save_Blue.png │ ├── Settings.png │ ├── SlideOverKit.MoreSample.UWP.csproj │ ├── Timeline_Blue.png │ ├── USBConnected_Color.png │ ├── UpIcon.png │ ├── VideoCall.png │ ├── icon.png │ └── xamconsulting.png ├── SlideOverKit.Sample │ ├── Pages │ │ ├── MainPage.cs │ │ ├── PopOverPage.cs │ │ ├── PopOverView.xaml │ │ ├── PopOverView.xaml.cs │ │ ├── PopOverWithTriangleView.xaml │ │ ├── PopOverWithTriangleView.xaml.cs │ │ ├── QuickInnerMenuPage.cs │ │ ├── QuickInnerMenuView.cs │ │ ├── RightSideDetailPage.cs │ │ ├── RightSideMasterPage.xaml │ │ ├── RightSideMasterPage.xaml.cs │ │ ├── SlideDownMenuPage.cs │ │ ├── SlideDownMenuView.xaml │ │ ├── SlideDownMenuView.xaml.cs │ │ ├── SlideUpMenuPage.cs │ │ ├── SlideUpMenuView.xaml │ │ └── SlideUpMenuView.xaml.cs │ ├── SlideOverKit.MoreSample.csproj │ └── SlideOverKit.Sample.cs ├── iOS │ ├── AppDelegate.cs │ ├── Entitlements.plist │ ├── ITunesArtwork │ ├── ITunesArtwork@2x │ ├── Info.plist │ ├── Main.cs │ ├── Renderer │ │ └── PageImpInterfaceRendereiOS.cs │ ├── Resources │ │ ├── About_Blue.png │ │ ├── Battery_Blue.png │ │ ├── Chat_Blue.png │ │ ├── CommandLine_Blue.png │ │ ├── Default-568h@2x.png │ │ ├── Default-Portrait.png │ │ ├── Default-Portrait@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── DoubleDown_Black.png │ │ ├── DoubleDown_Blue.png │ │ ├── DoubleDown_White.png │ │ ├── DoubleLeft.png │ │ ├── DoubleRight.png │ │ ├── DoubleUp.png │ │ ├── Enter.png │ │ ├── Filter_Blue.png │ │ ├── Happy.png │ │ ├── Home.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small-40.png │ │ ├── Icon-Small-40@2x.png │ │ ├── Icon-Small-40@3x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── LaunchScreen.storyboard │ │ ├── Map_Background.png │ │ ├── MessageFilled.png │ │ ├── Microphone.png │ │ ├── MoneyBag_Blue.png │ │ ├── Pencil.png │ │ ├── Report_Blue.png │ │ ├── Save_Blue.png │ │ ├── Settings.png │ │ ├── Timeline_Blue.png │ │ ├── USBConnected_Color.png │ │ ├── UpIcon.png │ │ ├── VideoCall.png │ │ ├── dog.jpg │ │ └── xamconsulting.png │ ├── SlideOverKit.MoreSample.iOS.csproj │ └── packages.config └── mutatio_backup │ ├── Properties │ └── AssemblyInfo.cs │ ├── SlideOverKit.MoreSample..csproj │ └── packages.config ├── UITests ├── AppInitializer.cs ├── SlideOverKit.Sample.UITests.csproj ├── Tests.cs └── packages.config ├── appveyor.yml ├── build.cake ├── build.ps1 ├── build.sh ├── install-android-sdk.ps1 ├── mutatio_backup └── SlideOverKit..csproj ├── tools └── packages.config └── website ├── LICENSE ├── README.md ├── css ├── agency.css ├── bootstrap.css ├── bootstrap.min.css └── csharp.css ├── font-awesome ├── css │ ├── font-awesome.css │ └── font-awesome.min.css ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── less │ ├── bordered-pulled.less │ ├── core.less │ ├── fixed-width.less │ ├── font-awesome.less │ ├── icons.less │ ├── larger.less │ ├── list.less │ ├── mixins.less │ ├── path.less │ ├── rotated-flipped.less │ ├── spinning.less │ ├── stacked.less │ └── variables.less └── scss │ ├── _bordered-pulled.scss │ ├── _core.scss │ ├── _fixed-width.scss │ ├── _icons.scss │ ├── _larger.scss │ ├── _list.scss │ ├── _mixins.scss │ ├── _path.scss │ ├── _rotated-flipped.scss │ ├── _spinning.scss │ ├── _stacked.scss │ ├── _variables.scss │ └── font-awesome.scss ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── img ├── about │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ └── 4.jpg ├── header-bg.jpg ├── logos │ ├── aetuts.jpg │ ├── creative-market.jpg │ ├── designmodo.jpg │ ├── envato.jpg │ ├── microlancer.jpg │ ├── themeforest.jpg │ └── wordpress.jpg ├── map-image.png ├── portfolio │ ├── NormalPage-Droid.png │ ├── NormalPage-iOS.png │ ├── PopOver-Droid.png │ ├── PopOver-iOS.png │ ├── PopOverPage-Droid.gif │ ├── PopOverPage-Droid.png │ ├── PopOverPage-iOS.gif │ ├── PopOverPage-iOS.png │ ├── QuickInnerMenu-Droid.png │ ├── QuickInnerMenu-iOS.png │ ├── QuickInnerMenuPage-Droid.gif │ ├── QuickInnerMenuPage-Droid.png │ ├── QuickInnerMenuPage-iOS.gif │ ├── QuickInnerMenuPage-iOS.png │ ├── RightMasterDetail-Droid.gif │ ├── RightMasterDetail-Droid.png │ ├── RightMasterDetail-iOS.gif │ ├── RightMasterDetail-iOS.png │ ├── SlideDownMenu-Droid.png │ ├── SlideDownMenu-iOS.png │ ├── SlideDownMenuPage-Droid.gif │ ├── SlideDownMenuPage-Droid.png │ ├── SlideDownMenuPage-iOS.gif │ ├── SlideDownMenuPage-iOS.png │ ├── SlideUpMenu-Droid.gif │ ├── SlideUpMenu-Droid.png │ ├── SlideUpMenu-iOS.gif │ └── SlideUpMenu-iOS.png ├── team │ ├── 1.jpg │ ├── 2.jpg │ └── 3.jpg └── xamconsulting.png ├── index.html ├── js ├── agency.js ├── bootstrap.js ├── bootstrap.min.js ├── cbpAnimatedHeader.js ├── cbpAnimatedHeader.min.js ├── classie.js ├── contact_me.js ├── jqBootstrapValidation.js └── jquery.js ├── less ├── agency.less ├── mixins.less └── variables.less └── mail └── contact_me.php /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | 24 | # Visual Studio 2015 cache/options directory 25 | .vs/ 26 | # Uncomment if you have tasks that create the project's static files in wwwroot 27 | #wwwroot/ 28 | 29 | # MSTest test Results 30 | [Tt]est[Rr]esult*/ 31 | [Bb]uild[Ll]og.* 32 | 33 | # NUNIT 34 | *.VisualState.xml 35 | TestResult.xml 36 | 37 | # Build Results of an ATL Project 38 | [Dd]ebugPS/ 39 | [Rr]eleasePS/ 40 | dlldata.c 41 | 42 | # DNX 43 | project.lock.json 44 | artifacts/ 45 | 46 | *_i.c 47 | *_p.c 48 | *_i.h 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.tmp_proj 63 | *.log 64 | *.vspscc 65 | *.vssscc 66 | .builds 67 | *.pidb 68 | *.svclog 69 | *.scc 70 | 71 | # Chutzpah Test files 72 | _Chutzpah* 73 | 74 | # Visual C++ cache files 75 | ipch/ 76 | *.aps 77 | *.ncb 78 | *.opendb 79 | *.opensdf 80 | *.sdf 81 | *.cachefile 82 | 83 | # Visual Studio profiler 84 | *.psess 85 | *.vsp 86 | *.vspx 87 | *.sap 88 | 89 | # TFS 2012 Local Workspace 90 | $tf/ 91 | 92 | # Guidance Automation Toolkit 93 | *.gpState 94 | 95 | # ReSharper is a .NET coding add-in 96 | _ReSharper*/ 97 | *.[Rr]e[Ss]harper 98 | *.DotSettings.user 99 | 100 | # JustCode is a .NET coding add-in 101 | .JustCode 102 | 103 | # TeamCity is a build add-in 104 | _TeamCity* 105 | 106 | # DotCover is a Code Coverage Tool 107 | *.dotCover 108 | 109 | # NCrunch 110 | _NCrunch_* 111 | .*crunch*.local.xml 112 | nCrunchTemp_* 113 | 114 | # MightyMoose 115 | *.mm.* 116 | AutoTest.Net/ 117 | 118 | # Web workbench (sass) 119 | .sass-cache/ 120 | 121 | # Installshield output folder 122 | [Ee]xpress/ 123 | 124 | # DocProject is a documentation generator add-in 125 | DocProject/buildhelp/ 126 | DocProject/Help/*.HxT 127 | DocProject/Help/*.HxC 128 | DocProject/Help/*.hhc 129 | DocProject/Help/*.hhk 130 | DocProject/Help/*.hhp 131 | DocProject/Help/Html2 132 | DocProject/Help/html 133 | 134 | # Click-Once directory 135 | publish/ 136 | 137 | # Publish Web Output 138 | *.[Pp]ublish.xml 139 | *.azurePubxml 140 | # TODO: Comment the next line if you want to checkin your web deploy settings 141 | # but database connection strings (with potential passwords) will be unencrypted 142 | *.pubxml 143 | *.publishproj 144 | 145 | # NuGet Packages 146 | *.nupkg 147 | # The packages folder can be ignored because of Package Restore 148 | **/packages/* 149 | # except build/, which is used as an MSBuild target. 150 | !**/packages/build/ 151 | # Uncomment if necessary however generally it will be regenerated when needed 152 | #!**/packages/repositories.config 153 | # NuGet v3's project.json files produces more ignoreable files 154 | *.nuget.props 155 | *.nuget.targets 156 | 157 | # Microsoft Azure Build Output 158 | csx/ 159 | *.build.csdef 160 | 161 | # Microsoft Azure Emulator 162 | ecf/ 163 | rcf/ 164 | 165 | # Microsoft Azure ApplicationInsights config file 166 | ApplicationInsights.config 167 | 168 | # Windows Store app package directory 169 | AppPackages/ 170 | BundleArtifacts/ 171 | 172 | # Visual Studio cache files 173 | # files ending in .cache can be ignored 174 | *.[Cc]ache 175 | # but keep track of directories ending in .cache 176 | !*.[Cc]ache/ 177 | 178 | # Others 179 | ClientBin/ 180 | ~$* 181 | *~ 182 | *.dbmdl 183 | *.dbproj.schemaview 184 | *.pfx 185 | *.publishsettings 186 | node_modules/ 187 | orleans.codegen.cs 188 | 189 | # RIA/Silverlight projects 190 | Generated_Code/ 191 | 192 | # Backup & report files from converting an old project file 193 | # to a newer Visual Studio version. Backup files are not needed, 194 | # because we have git ;-) 195 | _UpgradeReport_Files/ 196 | Backup*/ 197 | UpgradeLog*.XML 198 | UpgradeLog*.htm 199 | 200 | # SQL Server files 201 | *.mdf 202 | *.ldf 203 | 204 | # Business Intelligence projects 205 | *.rdl.data 206 | *.bim.layout 207 | *.bim_*.settings 208 | 209 | # Microsoft Fakes 210 | FakesAssemblies/ 211 | 212 | # GhostDoc plugin setting file 213 | *.GhostDoc.xml 214 | 215 | # Node.js Tools for Visual Studio 216 | .ntvs_analysis.dat 217 | 218 | # Visual Studio 6 build log 219 | *.plg 220 | 221 | # Visual Studio 6 workspace options file 222 | *.opt 223 | 224 | # Visual Studio LightSwitch build output 225 | **/*.HTMLClient/GeneratedArtifacts 226 | **/*.DesktopClient/GeneratedArtifacts 227 | **/*.DesktopClient/ModelManifest.xml 228 | **/*.Server/GeneratedArtifacts 229 | **/*.Server/ModelManifest.xml 230 | _Pvt_Extensions 231 | 232 | # Paket dependency manager 233 | .paket/paket.exe 234 | 235 | # FAKE - F# Make 236 | .fake/ 237 | 238 | # Cake Build related 239 | tools/** 240 | !tools/packages.config 241 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SlideOverKit is a premium component for Xamarin.Forms. It allows developers to easily create awesome Slideovers in Xamarin.Forms. 2 | 3 | ## Docs 4 | 5 | Please see more over at (https://www.xam.com.au/slideoverkit-xamarin-forms/) 6 | 7 | ## Samples 8 | 9 | #### RightSide MasterDetail 10 | 11 | ![RightMasterDetail](http://www.xam.com.au/slideoverkit-xamarin-forms/img/portfolio/RightMasterDetail-iOS.gif) 12 | 13 | #### Sliding Up Menu 14 | 15 | ![Sliding Up Menu](http://www.xam.com.au/slideoverkit-xamarin-forms/img/portfolio/SlideUpMenu-iOS.gif) 16 | 17 | #### Sliding Down Menu 18 | 19 | ![Sliding Down Menu](http://www.xam.com.au/slideoverkit-xamarin-forms/img/portfolio/SlideDownMenuPage-iOS.gif) 20 | 21 | #### Quick Inner Menu 22 | 23 | ![Quick Inner Menu ](http://www.xam.com.au/slideoverkit-xamarin-forms/img/portfolio/QuickInnerMenuPage-iOS.gif) 24 | 25 | #### Popup Menu 26 | ![Popup Menu](https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/master/website/img/portfolio/PopOverPage-iOS.gif) 27 | -------------------------------------------------------------------------------- /SlideOverKit.Droid/ISlideOverKitPageRendererDroid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.Android; 3 | using Xamarin.Forms; 4 | 5 | namespace SlideOverKit.Droid 6 | { 7 | public interface ISlideOverKitPageRendererDroid 8 | { 9 | Action> OnElementChangedEvent { get; set; } 10 | 11 | Action OnLayoutEvent { get; set; } 12 | 13 | Action OnSizeChangedEvent { get; set; } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /SlideOverKit.Droid/MenuContainerPageDroidRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using SlideOverKit; 4 | using Xamarin.Forms.Platform.Android; 5 | using SlideOverKit.Droid; 6 | using Android.Views; 7 | using Android.Content; 8 | 9 | [assembly: ExportRenderer (typeof(MenuContainerPage), typeof(MenuContainerPageDroidRenderer))] 10 | namespace SlideOverKit.Droid 11 | { 12 | public class MenuContainerPageDroidRenderer : PageRenderer, ISlideOverKitPageRendererDroid 13 | { 14 | public Action> OnElementChangedEvent { get; set; } 15 | 16 | public Action OnLayoutEvent { get; set; } 17 | 18 | public Action OnSizeChangedEvent { get; set; } 19 | 20 | public MenuContainerPageDroidRenderer (Context context):base(context) 21 | { 22 | new SlideOverKitDroidHandler ().Init (this, context); 23 | } 24 | 25 | protected override void OnElementChanged (ElementChangedEventArgs e) 26 | { 27 | base.OnElementChanged (e); 28 | if (OnElementChangedEvent != null) 29 | OnElementChangedEvent (e); 30 | } 31 | 32 | protected override void OnLayout (bool changed, int l, int t, int r, int b) 33 | { 34 | base.OnLayout (changed, l, t, r, b); 35 | if (OnLayoutEvent != null) 36 | OnLayoutEvent (changed, l, t, r, b); 37 | } 38 | 39 | protected override void OnSizeChanged (int w, int h, int oldw, int oldh) 40 | { 41 | base.OnSizeChanged (w, h, oldw, oldh); 42 | if (OnSizeChangedEvent != null) 43 | OnSizeChangedEvent (w, h, oldw, oldh); 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /SlideOverKit.Droid/Resources/Resource.designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKit.Droid/Resources/Resource.designer.cs -------------------------------------------------------------------------------- /SlideOverKit.Droid/SlideMenuDroidRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using SlideOverKit.Droid; 4 | using Xamarin.Forms.Platform.Android; 5 | using SlideOverKit; 6 | using Android.Views; 7 | using Android.Content; 8 | 9 | [assembly: ExportRenderer (typeof(SlideMenuView), typeof(SlideMenuDroidRenderer))] 10 | namespace SlideOverKit.Droid 11 | { 12 | public class SlideMenuDroidRenderer : ViewRenderer 13 | { 14 | IDragGesture _dragGesture; 15 | 16 | internal IDragGesture GragGesture { get { return _dragGesture; } } 17 | 18 | public SlideMenuDroidRenderer():base() 19 | { 20 | 21 | } 22 | 23 | public SlideMenuDroidRenderer (Context context):base(context) 24 | { 25 | } 26 | 27 | protected override void OnElementChanged (ElementChangedEventArgs e) 28 | { 29 | base.OnElementChanged (e); 30 | InitDragGesture (); 31 | } 32 | 33 | void InitDragGesture () 34 | { 35 | var menu = Element as SlideMenuView; 36 | if (menu == null) 37 | return; 38 | if (ScreenSizeHelper.ScreenHeight == 0 && ScreenSizeHelper.ScreenWidth == 0) { 39 | ScreenSizeHelper.ScreenWidth = Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density; 40 | ScreenSizeHelper.ScreenHeight = Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density; 41 | } 42 | _dragGesture = DragGestureFactory.GetGestureByView (menu, this.Resources.DisplayMetrics.Density); 43 | _dragGesture.RequestLayout = (l, t, r, b, desity) => { 44 | this.SetX ((float)l); 45 | this.SetY ((float)t); 46 | }; 47 | } 48 | 49 | public override bool OnTouchEvent (MotionEvent e) 50 | { 51 | if (_dragGesture == null) 52 | return false; 53 | MotionEventActions action = e.Action & MotionEventActions.Mask; 54 | if (action == MotionEventActions.Down) 55 | _dragGesture.DragBegin (e.RawX, e.RawY); 56 | if (action == MotionEventActions.Move) 57 | _dragGesture.DragMoving (e.RawX, e.RawY); 58 | if (action == MotionEventActions.Up) 59 | _dragGesture.DragFinished (); 60 | return true; 61 | } 62 | 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /SlideOverKit.Droid/SlidePopupViewRendererDroid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using SlideOverKit; 4 | using Xamarin.Forms.Platform.Android; 5 | using Android.Content; 6 | 7 | [assembly: ExportRenderer (typeof(SlidePopupView), typeof(SlideOverKit.Droid.SlidePopupViewRendererDroid))] 8 | namespace SlideOverKit.Droid 9 | { 10 | public class SlidePopupViewRendererDroid: VisualElementRenderer 11 | { 12 | public SlidePopupViewRendererDroid(Context context):base(context) 13 | { 14 | 15 | } 16 | protected override void OnElementChanged (ElementChangedEventArgs e) 17 | { 18 | base.OnElementChanged (e); 19 | if (ScreenSizeHelper.ScreenHeight == 0 && ScreenSizeHelper.ScreenWidth == 0) { 20 | ScreenSizeHelper.ScreenWidth = Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density; 21 | ScreenSizeHelper.ScreenHeight = Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density; 22 | } 23 | } 24 | 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /SlideOverKit.Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /SlideOverKit.UWP/ISlideOverKitPageRendererUWP.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Xamarin.Forms; 7 | using Xamarin.Forms.Platform.UWP; 8 | 9 | namespace SlideOverKit.UWP 10 | { 11 | public interface ISlideOverKitPageRendererUWP 12 | { 13 | Action> OnElementChangedEvent { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SlideOverKit.UWP/MenuContainerPageUWPRenderer.cs: -------------------------------------------------------------------------------- 1 | using SlideOverKit; 2 | using SlideOverKit.UWP; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Xamarin.Forms; 9 | using Xamarin.Forms.Platform.UWP; 10 | using Windows.Foundation; 11 | 12 | [assembly: ExportRenderer(typeof(MenuContainerPage), typeof(MenuContainerPageUWPRenderer))] 13 | namespace SlideOverKit.UWP 14 | { 15 | public class MenuContainerPageUWPRenderer : PageRenderer, ISlideOverKitPageRendererUWP 16 | { 17 | public Action> OnElementChangedEvent { get; set; } 18 | SlideOverKitUWPHandler _handler; 19 | 20 | public MenuContainerPageUWPRenderer() 21 | { 22 | _handler = new SlideOverKitUWPHandler(); 23 | _handler.Init(this); 24 | } 25 | 26 | protected override void OnElementChanged(ElementChangedEventArgs e) 27 | { 28 | base.OnElementChanged(e); 29 | if (OnElementChangedEvent != null) 30 | OnElementChangedEvent(e); 31 | } 32 | 33 | protected override void Dispose(bool disposing) 34 | { 35 | _handler.Dispose(); 36 | base.Dispose(disposing); 37 | _handler = null; 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SlideOverKit.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("SlideOverKit.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SlideOverKit.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 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)] -------------------------------------------------------------------------------- /SlideOverKit.UWP/Properties/SlideOverKit.UWP.rd.xml: -------------------------------------------------------------------------------- 1 | 2 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /SlideOverKit.UWP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "6.0.7", 4 | "Xamarin.Forms": "2.5.0.280555" 5 | }, 6 | "frameworks": { 7 | "uap10.0.16299": {} 8 | }, 9 | "runtimes": { 10 | "win10-arm": {}, 11 | "win10-arm-aot": {}, 12 | "win10-x86": {}, 13 | "win10-x86-aot": {}, 14 | "win10-x64": {}, 15 | "win10-x64-aot": {} 16 | } 17 | } -------------------------------------------------------------------------------- /SlideOverKit.iOS/ISlideOverKitPageRendereriOS.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms.Platform.iOS; 3 | using UIKit; 4 | using CoreGraphics; 5 | 6 | namespace SlideOverKit.iOS 7 | { 8 | public interface ISlideOverKitPageRendereriOS 9 | { 10 | Action ViewDidAppearEvent { get; set; } 11 | 12 | Action OnElementChangedEvent { get; set; } 13 | 14 | Action ViewWillTransitionToSizeEvent { get; set; } 15 | 16 | Action ViewDidLayoutSubviewsEvent { get; set; } 17 | 18 | Action ViewDidDisappearEvent { get; set; } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/MenuContainerPageiOSRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using SlideOverKit; 4 | using SlideOverKit.iOS; 5 | using Xamarin.Forms.Platform.iOS; 6 | using UIKit; 7 | using CoreGraphics; 8 | 9 | [assembly: ExportRenderer (typeof(MenuContainerPage), typeof(MenuContainerPageiOSRenderer))] 10 | namespace SlideOverKit.iOS 11 | { 12 | public class MenuContainerPageiOSRenderer : PageRenderer, ISlideOverKitPageRendereriOS 13 | { 14 | public Action ViewDidAppearEvent { get; set; } 15 | 16 | public Action OnElementChangedEvent { get; set; } 17 | 18 | public Action ViewDidLayoutSubviewsEvent { get; set; } 19 | 20 | public Action ViewDidDisappearEvent { get; set; } 21 | 22 | public Action ViewWillTransitionToSizeEvent { get; set; } 23 | 24 | public MenuContainerPageiOSRenderer () 25 | { 26 | new SlideOverKitiOSHandler ().Init (this); 27 | } 28 | 29 | protected override void OnElementChanged (VisualElementChangedEventArgs e) 30 | { 31 | base.OnElementChanged (e); 32 | 33 | if (OnElementChangedEvent != null) 34 | OnElementChangedEvent (e); 35 | } 36 | 37 | public override void ViewDidLayoutSubviews () 38 | { 39 | base.ViewDidLayoutSubviews (); 40 | if (ViewDidLayoutSubviewsEvent != null) 41 | ViewDidLayoutSubviewsEvent (); 42 | 43 | } 44 | 45 | public override void ViewDidAppear (bool animated) 46 | { 47 | base.ViewDidAppear (animated); 48 | if (ViewDidAppearEvent != null) 49 | ViewDidAppearEvent (animated); 50 | 51 | } 52 | 53 | public override void ViewDidDisappear (bool animated) 54 | { 55 | base.ViewDidDisappear (animated); 56 | if (ViewDidDisappearEvent != null) 57 | ViewDidDisappearEvent (animated); 58 | } 59 | 60 | public override void ViewWillTransitionToSize (CGSize toSize, IUIViewControllerTransitionCoordinator coordinator) 61 | { 62 | base.ViewWillTransitionToSize (toSize, coordinator); 63 | if (ViewWillTransitionToSizeEvent != null) 64 | ViewWillTransitionToSizeEvent (toSize, coordinator); 65 | } 66 | 67 | } 68 | } 69 | 70 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("SlideOverKit.iOS")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("XAM consulting")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("JesseJiang")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/SlideOVerKit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SlideOverKit.iOS 4 | { 5 | public class SlideOverKit 6 | { 7 | public static void Init() 8 | { 9 | var mc = new MenuContainerPageiOSRenderer (); //need to do this to or it doesn't work in release 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/SlideOverKit.iOS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 8 | {172A0370-0293-4003-AD03-57419DDDC6BD} 9 | Library 10 | SlideOverKit.iOS 11 | Resources 12 | SlideOverKit.iOS 13 | 1.1.0 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG; 21 | prompt 22 | 4 23 | false 24 | 25 | 26 | full 27 | true 28 | bin\Release 29 | prompt 30 | 4 31 | false 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll 40 | 41 | 42 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll 43 | 44 | 45 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll 46 | 47 | 48 | ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | {EF099C9A-2BB4-468D-8352-867896E7B275} 63 | SlideOverKit 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/SlidePopupViewRendereriOS.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using SlideOverKit; 4 | using Xamarin.Forms.Platform.iOS; 5 | using UIKit; 6 | 7 | [assembly: ExportRenderer (typeof(SlidePopupView), typeof(SlideOverKit.iOS.SlidePopupViewRendereriOS))] 8 | namespace SlideOverKit.iOS 9 | { 10 | public class SlidePopupViewRendereriOS : VisualElementRenderer 11 | { 12 | 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /SlideOverKit.iOS/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /SlideOverKit.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SlideOverKit 5 | 2.1.6.1 6 | SlideOverKit 7 | Michael Ridland @ XAM Consulting 8 | Michael Ridland @ XAM Consulting 9 | http://www.xam-consulting.com/slideoverkit-xamarin-forms/ 10 | false 11 | Easily Create Awesome Slideover's in Xamarin.Forms 12 | Xamarin, Xamarin.Forms, SlideOverKit 13 | 14 | 2.1.6.1 15 | [fix] ObjectDisposedException on Android. 16 | 17 | 2.1.6 18 | [update] Updated Xamarin.Forms to latest version (2.5.0.280555). 19 | [update] Updated Android Support packages. 20 | [update] Updated Xamarin.Forms obsolete methods 21 | [update] Converted project to .NET Standard 2.0 22 | 23 | 2.1.5 24 | [fix] Gestures not working on Android. 25 | 26 | 2.1.4 27 | [fix] Popups position incorrect issue on iOS. 28 | 29 | 2.1.3 30 | [fix] Improve the moving gesture performance. 31 | [fix] Remove resource file in Android library. 32 | 33 | 2.1.2.1 34 | [fix] iOS crash when page is disappearing. 35 | 36 | 2.1.2 37 | [fix] Popups crash on Android if target control is null. 38 | [fix] Menu cannot unfocused when it disappear. 39 | 40 | 2.1.1 41 | [fix] Menu doesn't work in the first page of UWP 42 | [fix] Popups doesn't work correctly in ScrollView and TableViews. 43 | 44 | 2.1.0 45 | [feature] Add AdjustX/Y in SlidePopupView 46 | 47 | 2.0.0 48 | [feature] Support UWP. 49 | 50 | 1.1.0 51 | [feature] Support with Xamarin.Forms 2.2. 52 | [fix] Layout fixes thanks to the great Jason Smith (@jassmith87). 53 | 54 | 1.0.2.1 55 | [fix] Rotation layout issues. 56 | 57 | 1.0.2 58 | [feature] Add new multiple pop-over control, it can anchor to specified control. 59 | 60 | 1.0.0 61 | [feature] Add SlideMenuView. 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /SlideOverKit/Gestures/DragGestureFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SlideOverKit 4 | { 5 | public class DragGestureFactory 6 | { 7 | public static IDragGesture GetGestureByView (SlideMenuView view, double density = 1.0f) 8 | { 9 | switch (view.MenuOrientations) { 10 | case MenuOrientation.TopToBottom: 11 | return new VerticalGesture (view, density); 12 | case MenuOrientation.BottomToTop: 13 | return new VerticalGesture (view, density); 14 | case MenuOrientation.LeftToRight: 15 | return new HorizontalGestures (view, density); 16 | case MenuOrientation.RightToLeft: 17 | return new HorizontalGestures (view, density); 18 | default: 19 | return new VerticalGesture (view, density); 20 | } 21 | } 22 | } 23 | 24 | internal class GestureBase 25 | { 26 | protected double _oldX, _oldY, _left, _right, _top, _bottom = 0; 27 | protected double _density = 1; 28 | protected bool _willShown = true; 29 | 30 | internal GestureBase (SlideMenuView view, double density) 31 | { 32 | _density = density; 33 | view.GetIsShown = () => { 34 | return !_willShown; 35 | }; 36 | } 37 | 38 | 39 | 40 | public Action RequestLayout { 41 | get; 42 | set; 43 | } 44 | 45 | public Action NeedShowBackgroundView { 46 | get; 47 | set; 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /SlideOverKit/Gestures/IDragGesture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SlideOverKit 4 | { 5 | public struct Rect 6 | { 7 | public double left, top, right, bottom; 8 | 9 | } 10 | 11 | public interface IDragGesture 12 | { 13 | void DragBegin (double x, double y); 14 | 15 | void DragMoving (double x, double y); 16 | 17 | void DragFinished (); 18 | 19 | Action RequestLayout { get; set; } 20 | 21 | void LayoutShowStatus (); 22 | 23 | void LayoutHideStatus (); 24 | 25 | Rect GetShowPosition (); 26 | 27 | Rect GetHidePosition (); 28 | 29 | void UpdateLayoutSize (SlideMenuView view); 30 | 31 | Action NeedShowBackgroundView { get; set; } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /SlideOverKit/IMenuContainerPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SlideOverKit 4 | { 5 | public interface IMenuContainerPage 6 | { 7 | SlideMenuView SlideMenu { get; set; } 8 | 9 | Action ShowMenuAction { get; set; } 10 | 11 | Action HideMenuAction { get; set; } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /SlideOverKit/IPopupContainerPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace SlideOverKit 5 | { 6 | public interface IPopupContainerPage 7 | { 8 | Dictionary PopupViews { get; set; } 9 | 10 | Action ShowPopupAction { get; set; } 11 | 12 | Action HidePopupAction { get; set; } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /SlideOverKit/MenuContainerPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Xamarin.Forms; 4 | using System.Collections.Generic; 5 | 6 | namespace SlideOverKit 7 | { 8 | public class MenuContainerPage : ContentPage, IMenuContainerPage, IPopupContainerPage 9 | { 10 | public MenuContainerPage () 11 | { 12 | PopupViews = new Dictionary (); 13 | } 14 | 15 | SlideMenuView slideMenu; 16 | public SlideMenuView SlideMenu { 17 | get { 18 | return slideMenu; 19 | } 20 | set { 21 | if (slideMenu != null) 22 | slideMenu.Parent = null; 23 | slideMenu = value; 24 | if (slideMenu != null) 25 | slideMenu.Parent = this; 26 | } 27 | } 28 | 29 | public Action ShowMenuAction { get; set; } 30 | 31 | public Action HideMenuAction { get; set; } 32 | 33 | public Dictionary PopupViews { get; set; } 34 | 35 | public Action ShowPopupAction { get; set; } 36 | 37 | public Action HidePopupAction { get; set; } 38 | 39 | public void ShowMenu () 40 | { 41 | if (ShowMenuAction != null) 42 | ShowMenuAction (); 43 | } 44 | 45 | public void HideMenu () 46 | { 47 | if (HideMenuAction != null) 48 | HideMenuAction (); 49 | } 50 | 51 | public void ShowPopup (string name) 52 | { 53 | if (ShowPopupAction != null) 54 | ShowPopupAction (name); 55 | } 56 | 57 | public void HidePopup () 58 | { 59 | if (HidePopupAction != null) 60 | HidePopupAction (); 61 | } 62 | } 63 | } 64 | 65 | 66 | -------------------------------------------------------------------------------- /SlideOverKit/PopupViewAttached.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace SlideOverKit 5 | { 6 | public class PopupViewAttached 7 | { 8 | const int menuOffSet = 5; 9 | 10 | public static readonly BindableProperty TargetProperty = 11 | BindableProperty.CreateAttached ( 12 | propertyName: "Target", 13 | returnType: typeof(string), 14 | declaringType: typeof(VisualElement), 15 | defaultValue: null, 16 | defaultBindingMode: BindingMode.OneWay, 17 | validateValue: null, 18 | propertyChanged: OnTargetChanged); 19 | 20 | public static void SetTarget (BindableObject bindable, object target) 21 | { 22 | bindable.SetValue (TargetProperty, target); 23 | } 24 | 25 | public static object GetTarget (BindableObject bindable) 26 | { 27 | return (object)bindable.GetValue(TargetProperty); 28 | } 29 | 30 | public static void OnTargetChanged (BindableObject bindable, object oldValue, object newValue) 31 | { 32 | var control = bindable as VisualElement; 33 | 34 | var parent = control.Parent; 35 | //FIXME if we use attached binding in XAML, control.Parent alway return null 36 | while (!(parent == null || parent is IPopupContainerPage)) { 37 | parent = parent.Parent; 38 | } 39 | 40 | if (parent is IPopupContainerPage) { 41 | var container = parent as IPopupContainerPage; 42 | if (container.PopupViews.ContainsKey (newValue.ToString ())) { 43 | var popup = container.PopupViews [newValue.ToString ()] as SlidePopupView; 44 | if (popup != null) { 45 | popup.TargetControl = control; 46 | } 47 | } 48 | 49 | } 50 | } 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /SlideOverKit/ScreenSizeHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace SlideOverKit 4 | { 5 | public static class ScreenSizeHelper 6 | { 7 | public static double ScreenWidth; 8 | public static double ScreenHeight; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /SlideOverKit/SlideOverKit.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.0;netstandard1.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /SlideOverKit/SlidePopupView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace SlideOverKit 5 | { 6 | public class SlidePopupView : Frame 7 | { 8 | public static readonly BindableProperty LeftMarginProperty = BindableProperty.Create (nameof (TopMargin), typeof (double), typeof (SlidePopupView), default (double)); 9 | 10 | public double LeftMargin { 11 | get { return (double)GetValue (LeftMarginProperty); } 12 | set { SetValue (LeftMarginProperty, value); } 13 | } 14 | 15 | public static readonly BindableProperty TopMarginProperty = BindableProperty.Create (nameof (TopMargin), typeof (double), typeof (SlidePopupView), default (double)); 16 | 17 | public double TopMargin { 18 | get { return (double)GetValue (TopMarginProperty); } 19 | set { SetValue (TopMarginProperty, value); } 20 | } 21 | 22 | public static readonly BindableProperty BackgroundViewColorProperty = BindableProperty.Create (nameof (BackgroundViewColor), typeof (Color), typeof (SlidePopupView), Color.Gray); 23 | 24 | public Color BackgroundViewColor { 25 | get { return (Color)GetValue (BackgroundViewColorProperty); } 26 | set { SetValue (BackgroundViewColorProperty, value); } 27 | } 28 | 29 | public static readonly BindableProperty AdjustXProperty = BindableProperty.Create (nameof (AdjustX), typeof (double), typeof (SlidePopupView), default (double)); 30 | 31 | public double AdjustX { 32 | get { return (double)GetValue (AdjustXProperty); } 33 | set { SetValue (AdjustXProperty, value); } 34 | } 35 | 36 | public static readonly BindableProperty AdjustYProperty = BindableProperty.Create (nameof (AdjustY), typeof (double), typeof (SlidePopupView), default (double)); 37 | 38 | public double AdjustY { 39 | get { return (double)GetValue (AdjustYProperty); } 40 | set { SetValue (AdjustYProperty, value); } 41 | } 42 | 43 | public VisualElement TargetControl { get; set; } 44 | 45 | public Action HideMySelf { get; set; } 46 | 47 | public void Hide () 48 | { 49 | if (HideMySelf != null) 50 | HideMySelf (); 51 | } 52 | 53 | public void CalucatePosition (Point? point = null) 54 | { 55 | // In this case, popup layout need Left and top margin, 56 | // we need not to calucate the position, no matter the sreen orientation 57 | if (TargetControl == null) 58 | return; 59 | 60 | Point newPos; 61 | if (!point.HasValue) { 62 | newPos = new Point { 63 | X = TargetControl.X, 64 | Y = TargetControl.Y 65 | }; 66 | } else { 67 | newPos = point.Value; 68 | } 69 | 70 | // In this case, we need to calucate the position every time based on the Target control 71 | // before we do that we need to set Left and Top Margin as 0 72 | LeftMargin = 0; 73 | TopMargin = 0; 74 | 75 | if (this.HorizontalOptions.Alignment == LayoutAlignment.Start) 76 | LeftMargin = newPos.X; 77 | else if (this.HorizontalOptions.Alignment == LayoutAlignment.End) 78 | LeftMargin += newPos.X + TargetControl.Width / 2; 79 | else 80 | LeftMargin += newPos.X + TargetControl.Width / 2 - this.WidthRequest / 2; 81 | 82 | if (this.VerticalOptions.Alignment == LayoutAlignment.Start) 83 | TopMargin += newPos.Y; 84 | else if (this.VerticalOptions.Alignment == LayoutAlignment.End) 85 | TopMargin += newPos.Y + TargetControl.Height; 86 | else 87 | TopMargin += newPos.Y + (TargetControl.Height / 2); 88 | 89 | 90 | // point is used in Android, cause it can get the parent control position from API 91 | // Therefore no need to calculate position like this 92 | // Get position in iOS 93 | if (!point.HasValue) { 94 | var parent = TargetControl.Parent; 95 | while (!(parent == null || parent is IPopupContainerPage)) { 96 | if (parent is ScrollView) { 97 | LeftMargin -= (parent as ScrollView).ScrollX; 98 | TopMargin -= (parent as ScrollView).ScrollY; 99 | } 100 | LeftMargin += (parent as VisualElement).X; 101 | TopMargin += (parent as VisualElement).Y; 102 | parent = parent.Parent; 103 | } 104 | } 105 | 106 | LeftMargin += AdjustX; 107 | TopMargin += AdjustY; 108 | } 109 | 110 | public SlidePopupView () : base () 111 | { 112 | this.Padding = new Thickness (0); 113 | this.HasShadow = false; 114 | } 115 | 116 | public bool IsShown { get; set; } 117 | } 118 | } 119 | 120 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/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 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Android.App; 4 | using Android.Content; 5 | using Android.Content.PM; 6 | using Android.Runtime; 7 | using Android.Views; 8 | using Android.Widget; 9 | using Android.OS; 10 | using SlideOverKit.Droid; 11 | using SlideOverKit.MoreSample; 12 | 13 | namespace MenuKit.Sample.Droid 14 | { 15 | [Activity (Label = "SlideOverKit.MoreSample.Droid", Icon = "@drawable/icon", MainLauncher = true, Theme = "@android:style/Theme.Holo.Light", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 16 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity 17 | { 18 | protected override void OnCreate (Bundle bundle) 19 | { 20 | base.OnCreate (bundle); 21 | 22 | global::Xamarin.Forms.Forms.Init (this, bundle); 23 | 24 | LoadApplication (new App ()); 25 | } 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("SlideOverKit.MoreSample.Droid")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("XAM consulting")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("JesseJiang")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Renderer/PageImpInterfaceRendererDroid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | using Xamarin.Forms.Platform.Android; 4 | using SlideOverKit.Droid; 5 | using SlideOverKit.MoreSample; 6 | using SlideOverKit.MoreSample.Droid; 7 | using Android.Content; 8 | 9 | [assembly: ExportRenderer (typeof (SlideDownMenuPage), typeof (PageImpInterfaceRendererDroid))] 10 | namespace SlideOverKit.MoreSample.Droid 11 | { 12 | // As your page cannot inherit from MenuContainerPage, 13 | // You must create a renderer page, copy these codes and rename. 14 | public class PageImpInterfaceRendererDroid : PageRenderer, ISlideOverKitPageRendererDroid 15 | { 16 | public Action> OnElementChangedEvent { get; set; } 17 | 18 | public Action OnLayoutEvent { get; set; } 19 | 20 | public Action OnSizeChangedEvent { get; set; } 21 | 22 | public PageImpInterfaceRendererDroid (Context context) : base (context) 23 | { 24 | new SlideOverKitDroidHandler ().Init (this, context); 25 | } 26 | 27 | protected override void OnElementChanged (ElementChangedEventArgs e) 28 | { 29 | base.OnElementChanged (e); 30 | OnElementChangedEvent?.Invoke (e); 31 | } 32 | 33 | protected override void OnLayout (bool changed, int l, int t, int r, int b) 34 | { 35 | base.OnLayout (changed, l, t, r, b); 36 | OnLayoutEvent?.Invoke (changed, l, t, r, b); 37 | } 38 | 39 | protected override void OnSizeChanged (int w, int h, int oldw, int oldh) 40 | { 41 | base.OnSizeChanged (w, h, oldw, oldh); 42 | OnSizeChangedEvent?.Invoke (w, h, oldw, oldh); 43 | } 44 | } 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/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.axml), 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.axml 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.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/About_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/About_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Battery_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Battery_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Chat_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Chat_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/CommandLine_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/CommandLine_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_Black.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleDown_White.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleLeft.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleRight.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/DoubleUp.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Enter.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Filter_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Filter_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Happy.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Home.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Map_Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Map_Background.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/MessageFilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/MessageFilled.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Microphone.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/MoneyBag_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/MoneyBag_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Pencil.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Report_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Report_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Save_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Save_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Settings.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/Timeline_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/Timeline_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/USBConnected_Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/USBConnected_Color.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/UpIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/UpIcon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/VideoCall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/VideoCall.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/dog.jpg -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/icon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/Resources/drawable/xamconsulting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/Droid/Resources/drawable/xamconsulting.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/Droid/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/About_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/About_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Runtime.InteropServices.WindowsRuntime; 7 | using Windows.ApplicationModel; 8 | using Windows.ApplicationModel.Activation; 9 | using Windows.Foundation; 10 | using Windows.Foundation.Collections; 11 | using Windows.UI.Xaml; 12 | using Windows.UI.Xaml.Controls; 13 | using Windows.UI.Xaml.Controls.Primitives; 14 | using Windows.UI.Xaml.Data; 15 | using Windows.UI.Xaml.Input; 16 | using Windows.UI.Xaml.Media; 17 | using Windows.UI.Xaml.Navigation; 18 | 19 | namespace SlideOverKit.MoreSample.UWP 20 | { 21 | /// 22 | /// Provides application-specific behavior to supplement the default Application class. 23 | /// 24 | sealed partial class App : Application 25 | { 26 | /// 27 | /// Initializes the singleton application object. This is the first line of authored code 28 | /// executed, and as such is the logical equivalent of main() or WinMain(). 29 | /// 30 | public App() 31 | { 32 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( 33 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata | 34 | Microsoft.ApplicationInsights.WindowsCollectors.Session); 35 | this.InitializeComponent(); 36 | this.Suspending += OnSuspending; 37 | } 38 | 39 | /// 40 | /// Invoked when the application is launched normally by the end user. Other entry points 41 | /// will be used such as when the application is launched to open a specific file. 42 | /// 43 | /// Details about the launch request and process. 44 | protected override void OnLaunched(LaunchActivatedEventArgs e) 45 | { 46 | 47 | #if DEBUG 48 | if (System.Diagnostics.Debugger.IsAttached) 49 | { 50 | this.DebugSettings.EnableFrameRateCounter = true; 51 | } 52 | #endif 53 | 54 | Frame rootFrame = Window.Current.Content as Frame; 55 | 56 | // Do not repeat app initialization when the Window already has content, 57 | // just ensure that the window is active 58 | if (rootFrame == null) 59 | { 60 | // Create a Frame to act as the navigation context and navigate to the first page 61 | rootFrame = new Frame(); 62 | 63 | rootFrame.NavigationFailed += OnNavigationFailed; 64 | 65 | // you'll need to add `using System.Reflection;` 66 | List assembliesToInclude = new List(); 67 | 68 | //Now, add in all the assemblies your app uses 69 | assembliesToInclude.Add(typeof(SlideOverKit.MenuContainerPage).GetTypeInfo().Assembly); 70 | assembliesToInclude.Add(typeof(SlideOverKit.UWP.MenuContainerPageUWPRenderer).GetTypeInfo().Assembly); 71 | //Also do this for all your other 3rd party libraries 72 | 73 | Xamarin.Forms.Forms.Init(e, assembliesToInclude); 74 | 75 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 76 | { 77 | //TODO: Load state from previously suspended application 78 | } 79 | 80 | // Place the frame in the current Window 81 | Window.Current.Content = rootFrame; 82 | } 83 | 84 | if (rootFrame.Content == null) 85 | { 86 | // When the navigation stack isn't restored navigate to the first page, 87 | // configuring the new page by passing required information as a navigation 88 | // parameter 89 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 90 | } 91 | // Ensure the current window is active 92 | Window.Current.Activate(); 93 | } 94 | 95 | /// 96 | /// Invoked when Navigation to a certain page fails 97 | /// 98 | /// The Frame which failed navigation 99 | /// Details about the navigation failure 100 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 101 | { 102 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 103 | } 104 | 105 | /// 106 | /// Invoked when application execution is being suspended. Application state is saved 107 | /// without knowing whether the application will be terminated or resumed with the contents 108 | /// of memory still intact. 109 | /// 110 | /// The source of the suspend request. 111 | /// Details about the suspend request. 112 | private void OnSuspending(object sender, SuspendingEventArgs e) 113 | { 114 | var deferral = e.SuspendingOperation.GetDeferral(); 115 | //TODO: Save application state and stop any background activity 116 | deferral.Complete(); 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Battery_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Battery_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Chat_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Chat_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/CommandLine_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/CommandLine_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_Black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_Black.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleDown_White.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleLeft.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleRight.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/DoubleUp.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Enter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Enter.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Filter_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Filter_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Happy.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Home.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.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 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 17 | 18 | namespace SlideOverKit.MoreSample.UWP 19 | { 20 | /// 21 | /// An empty page that can be used on its own or navigated to within a Frame. 22 | /// 23 | public sealed partial class MainPage //: Page 24 | { 25 | public MainPage() 26 | { 27 | this.InitializeComponent(); 28 | LoadApplication(new SlideOverKit.MoreSample.App()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/MessageFilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/MessageFilled.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Microphone.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/MoneyBag_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/MoneyBag_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | SlideOverKit.MoreSample.UWP 18 | Michael 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 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Pencil.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.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("SlideOverKit.MoreSample.UWP")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SlideOverKit.MoreSample.UWP")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 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)] -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Renderer/PageImpInterfaceRendereUWP.cs: -------------------------------------------------------------------------------- 1 | using SlideOverKit.MoreSample; 2 | using SlideOverKit.MoreSample.UWP.Renderer; 3 | using SlideOverKit.UWP; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using Xamarin.Forms; 10 | using Xamarin.Forms.Platform.UWP; 11 | 12 | [assembly: ExportRenderer(typeof(SlideDownMenuPage), typeof(PageImpInterfaceRendereUWP))] 13 | namespace SlideOverKit.MoreSample.UWP.Renderer 14 | { 15 | public class PageImpInterfaceRendereUWP : PageRenderer, ISlideOverKitPageRendererUWP 16 | { 17 | public Action> OnElementChangedEvent { get; set; } 18 | SlideOverKitUWPHandler _handler; 19 | 20 | public PageImpInterfaceRendereUWP() 21 | { 22 | _handler = new SlideOverKitUWPHandler(); 23 | _handler.Init(this); 24 | } 25 | 26 | protected override void OnElementChanged(ElementChangedEventArgs e) 27 | { 28 | base.OnElementChanged(e); 29 | if (OnElementChangedEvent != null) 30 | OnElementChangedEvent(e); 31 | } 32 | 33 | protected override void Dispose(bool disposing) 34 | { 35 | _handler.Dispose(); 36 | base.Dispose(disposing); 37 | _handler = null; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Report_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Report_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Save_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Save_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Settings.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Timeline_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/Timeline_Blue.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/USBConnected_Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/USBConnected_Color.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/UpIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/UpIcon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/VideoCall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/VideoCall.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/icon.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/xamconsulting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XAM-Consulting/SlideOverKit/044ddb08fb583c0034464d55198e63439e948fa9/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/xamconsulting.png -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.Sample/Pages/MainPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Xamarin.Forms; 4 | 5 | namespace SlideOverKit.MoreSample 6 | { 7 | public class MainPage : ContentPage 8 | { 9 | public MainPage () 10 | { 11 | Content = new StackLayout { 12 | Orientation = StackOrientation.Vertical, 13 | VerticalOptions = LayoutOptions.Center, 14 | Spacing = 10, 15 | Children = { 16 | new Button { 17 | Text = "RightSideMasterDetail", 18 | Command = LaunchRightSideMasterDetailPage, 19 | }, 20 | new Button { 21 | Text = "SlideUpMenu", 22 | Command = LaunchSlideUpMenuPage, 23 | }, 24 | new Button{ 25 | Text ="SlideDownMenu", 26 | Command = LaunchSlideDownMenuPage, 27 | }, 28 | new Button{ 29 | Text ="QuickInnerMenu", 30 | Command = LaunchQuickInnerMenuPage, 31 | }, 32 | new Button{ 33 | Text ="Popovers", 34 | Command = LaunchPopoversPage, 35 | } 36 | } 37 | }; 38 | } 39 | 40 | public Command LaunchRightSideMasterDetailPage { 41 | get { 42 | return new Command (() => { 43 | Navigation.PushAsync(new RightSideDetailPage()); 44 | }); 45 | } 46 | } 47 | 48 | public Command LaunchSlideUpMenuPage { 49 | get { 50 | return new Command (() => { 51 | Navigation.PushAsync(new SlideUpMenuPage()); 52 | }); 53 | } 54 | } 55 | 56 | public Command LaunchSlideDownMenuPage{ 57 | get{ 58 | return new Command (() => { 59 | Navigation.PushAsync(new SlideDownMenuPage()); 60 | }); 61 | } 62 | } 63 | 64 | public Command LaunchQuickInnerMenuPage{ 65 | get{ 66 | return new Command (() => { 67 | Navigation.PushAsync(new QuickInnerMenuPage()); 68 | }); 69 | } 70 | } 71 | 72 | public Command LaunchPopoversPage{ 73 | get{ 74 | return new Command (() => { 75 | Navigation.PushAsync(new PopOverPage()); 76 | }); 77 | } 78 | } 79 | } 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.Sample/Pages/PopOverPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xamarin.Forms; 3 | 4 | namespace SlideOverKit.MoreSample 5 | { 6 | public class PopOverPage : MenuContainerPage 7 | { 8 | public PopOverPage () 9 | { 10 | var button = new Button { 11 | Text = "Show First Popup", 12 | Command = new Command (() => 13 | { 14 | this.ShowPopup ("FirstPopup"); 15 | }) 16 | }; 17 | 18 | // we can add two more Popup control in this way 19 | this.PopupViews.Add ("FirstPopup", new PopOverView ()); 20 | this.PopupViews.Add ("SecondPopup", new PopOverWithTriangleView ()); 21 | 22 | 23 | Content = new ScrollView { 24 | Orientation = ScrollOrientation.Both, 25 | Content = new StackLayout { 26 | Spacing = 10, 27 | Children = { 28 | new BoxView {BackgroundColor = Color.Transparent, HeightRequest = 300, WidthRequest=300}, 29 | button, 30 | new BoxView {BackgroundColor = Color.Transparent, HeightRequest = 500, WidthRequest=500}, 31 | } 32 | } 33 | }; 34 | 35 | this.ToolbarItems.Add (new ToolbarItem { 36 | Command = new Command (() => { 37 | 38 | if (this.PopupViews ["SecondPopup"].IsShown) { 39 | this.HidePopup (); 40 | } else { 41 | this.ShowPopup ("SecondPopup"); 42 | } 43 | }), 44 | Icon = "Filter_Blue.png", 45 | Text = "Filter", 46 | Priority = 0 47 | }); 48 | 49 | // Set First popup target control as the button 50 | // If you set target control you must set WidthRequest and HeightRequest in PopUpView 51 | PopupViewAttached.SetTarget (button, "FirstPopup"); 52 | // Set Second popup without target 53 | // In this case, you must set LeftMargin and TopMargin 54 | } 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /SlideOverKitMoreSamples/SlideOverKit.Sample/Pages/PopOverView.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |