├── LICENSE
├── README.md
├── SampleApp
├── SampleApp.sln
└── SampleApp
│ ├── SampleApp.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── Resource.Designer.cs
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── layout
│ │ │ ├── Tabbar.axml
│ │ │ └── Toolbar.axml
│ │ └── values
│ │ │ └── styles.xml
│ ├── SampleApp.Droid.csproj
│ ├── SampleApp.Droid.csproj.bak
│ ├── SampleApp.Droid.csproj.user
│ └── packages.config
│ ├── SampleApp.UWP
│ ├── 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
│ ├── Backup
│ │ ├── SampleApp.UWP.csproj
│ │ └── project.json
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── SampleApp.UWP.csproj
│ ├── SampleApp.UWP.nuget.targets
│ ├── Windows_TemporaryKey.pfx
│ └── project.lock.json
│ ├── SampleApp.WinPhone
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── Logo.scale-240.png
│ │ ├── SmallLogo.scale-240.png
│ │ ├── SplashScreen.scale-240.png
│ │ ├── Square71x71Logo.scale-240.png
│ │ ├── StoreLogo.scale-240.png
│ │ └── WideLogo.scale-240.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SampleApp.WinPhone.csproj
│ ├── SampleApp.WinPhone.csproj.user
│ └── packages.config
│ ├── SampleApp.Windows
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── Logo.scale-100.png
│ │ ├── SmallLogo.scale-100.png
│ │ ├── SplashScreen.scale-100.png
│ │ └── StoreLogo.scale-100.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SampleApp.Windows.csproj
│ ├── Windows_TemporaryKey.pfx
│ └── packages.config
│ ├── SampleApp.iOS
│ ├── AppDelegate.cs
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── 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
│ ├── SampleApp.iOS.csproj
│ ├── SampleApp.iOS.csproj.user
│ ├── iTunesArtwork
│ ├── iTunesArtwork@2x
│ └── packages.config
│ └── SampleApp
│ ├── App.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── SampleApp.csproj
│ ├── ViewModels
│ └── SampleViewModel.cs
│ ├── Views
│ ├── CodeExample.cs
│ ├── XamlExample.xaml
│ └── XamlExample.xaml.cs
│ └── packages.config
├── Xam.Plugin.PopupMenu
├── Xam.Plugin.Droid
│ ├── Extensions
│ │ └── ViewExtensions.cs
│ ├── PopupEffect.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ └── Resource.Designer.cs
│ ├── Xam.Plugin.Droid.csproj
│ ├── Xam.Plugin.Droid.csproj.bak
│ └── packages.config
├── Xam.Plugin.Shared
│ ├── PopupEffect.cs
│ ├── Xam.Plugin.Shared.projitems
│ └── Xam.Plugin.Shared.shproj
├── Xam.Plugin.UWP
│ ├── Backup
│ │ ├── Xam.Plugin.UWP.csproj
│ │ └── project.json
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Xam.Plugin.UWP.rd.xml
│ ├── Xam.Plugin.UWP.csproj
│ ├── Xam.Plugin.UWP.nuget.targets
│ └── project.lock.json
├── Xam.Plugin.WindowsPhone
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xam.Plugin.WindowsPhone.csproj
│ └── packages.config
├── Xam.Plugin.WindowsStore
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xam.Plugin.WindowsStore.csproj
│ └── packages.config
├── Xam.Plugin.iOS
│ ├── PopupEffect.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Xam.Plugin.iOS.csproj
│ └── packages.config
└── Xam.Plugin
│ ├── PopupMenu.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Xam.Plugin.csproj
│ └── packages.config
└── package.nuspec
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Ryan Dixon
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Xam.Plugin.PopupMenu
2 | A simple popup menu for Xamarin Forms.
3 | This project is not supposed to be feature rich, it is simple a ready quick and lightweight implementation for when you need a menu displayed over a view.
4 |
5 | ## Nuget
6 | https://www.nuget.org/packages/Xam.Plugin.PopupMenu/
7 |
8 | ## Images
9 | 
10 |
11 | ## Changelog
12 | * Version 1.1.0 -> Support binding via the ItemsSourceProperty
13 | * Version 1.0.0 -> Internal only (Don't use this one)
14 |
15 | ## Donations
16 | PayPal: ryandixon1993@gmail.com
17 | I can't thank you guys enough for the support on my other plugins!
18 |
19 | ## Setup
20 | iOS Only) Call the PopupEffect.Init method to make sure the linker picks this up correctly
21 | 1) Create a new PopupMenu Object
22 | 2) Either manually set the ItemsSource, or use SetBinding
23 | 3) Call ShowPopup on the PopupMenu, passing in the root view you wish for the popup to inherit from
24 | 4) Attach an event to OnItemSelected, this will return the PopupMenu and the selected string
25 |
26 | ## iOS Specifics
27 | * At the moment, the cancel button text can be changed via the PopupEffect object in the iOS project
28 | * The direction of the popover on the iPad can be set in the PopupEffect object in the iOS project
29 |
30 | ## Platform Support
31 | *Please note: I have only put in platforms I have tested myself.*
32 | * Xamarin.iOS : iOS 8 +
33 | * Xamarin.Droid : API 14 +
34 | * Windows Phone/Store RT : 8.1 +
35 | * Windows UWP : 10 +
36 | * Xamarin Forms : 2.3.3.180
37 |
38 | ## Feature Requests
39 | DM me on LinkedIn: http://linkedin.radsrc.com
40 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.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 you 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 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 | using Xam.Plugin.Droid;
10 |
11 | namespace SampleApp.Droid
12 | {
13 | [Activity(Label = "SampleApp", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
15 | {
16 | protected override void OnCreate(Bundle bundle)
17 | {
18 | TabLayoutResource = Resource.Layout.Tabbar;
19 | ToolbarResource = Resource.Layout.Toolbar;
20 |
21 | PopupEffect.Init();
22 | base.OnCreate(bundle);
23 |
24 | global::Xamarin.Forms.Forms.Init(this, bundle);
25 | LoadApplication(new App());
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("SampleApp.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("SampleApp.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/SampleApp.Droid.csproj.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {D84A9EE2-DBD3-45C5-B602-3C89FD59355A}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | SampleApp.Droid
13 | SampleApp.Droid
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | Properties\AndroidManifest.xml
19 | true
20 | v7.0
21 | armeabi,armeabi-v7a,x86
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | true
31 | full
32 | false
33 | bin\Debug\
34 | DEBUG;TRACE
35 | prompt
36 | 4
37 | True
38 | None
39 |
40 |
41 | pdbonly
42 | true
43 | bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 | False
48 | SdkOnly
49 |
50 |
51 |
52 | ..\..\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\FormsViewGroup.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
64 | True
65 |
66 |
67 | ..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
68 | True
69 |
70 |
71 | ..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
72 | True
73 |
74 |
75 | ..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
76 | True
77 |
78 |
79 | ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
80 | True
81 |
82 |
83 | ..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
84 | True
85 |
86 |
87 | ..\..\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Core.dll
88 | True
89 |
90 |
91 | ..\..\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
92 | True
93 |
94 |
95 | ..\..\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
96 | True
97 |
98 |
99 | ..\..\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
100 | True
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | {649559c6-1971-4b2e-b433-7cce59f8ce78}
130 | Xam.Plugin.Droid
131 |
132 |
133 | {8ced5218-382e-44f4-8699-d366d30ff168}
134 | Xam.Plugin
135 |
136 |
137 | {789fe89c-9ee1-4843-b680-14af22e15515}
138 | SampleApp
139 |
140 |
141 |
142 |
143 |
144 |
145 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/SampleApp.Droid.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HTC One_M8
5 | Tablet_Android_Accelerated_x86
6 |
7 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace SampleApp.UWP
19 | {
20 | ///
21 | /// Provides application-specific behavior to supplement the default Application class.
22 | ///
23 | sealed partial class App : Application
24 | {
25 | ///
26 | /// Initializes the singleton application object. This is the first line of authored code
27 | /// executed, and as such is the logical equivalent of main() or WinMain().
28 | ///
29 | public App()
30 | {
31 | this.InitializeComponent();
32 | this.Suspending += OnSuspending;
33 | }
34 |
35 | ///
36 | /// Invoked when the application is launched normally by the end user. Other entry points
37 | /// will be used such as when the application is launched to open a specific file.
38 | ///
39 | /// Details about the launch request and process.
40 | protected override void OnLaunched(LaunchActivatedEventArgs e)
41 | {
42 |
43 | #if DEBUG
44 | if (System.Diagnostics.Debugger.IsAttached)
45 | {
46 | this.DebugSettings.EnableFrameRateCounter = true;
47 | }
48 | #endif
49 |
50 | Frame rootFrame = Window.Current.Content as Frame;
51 |
52 | // Do not repeat app initialization when the Window already has content,
53 | // just ensure that the window is active
54 | if (rootFrame == null)
55 | {
56 | // Create a Frame to act as the navigation context and navigate to the first page
57 | rootFrame = new Frame();
58 |
59 | rootFrame.NavigationFailed += OnNavigationFailed;
60 |
61 | Xamarin.Forms.Forms.Init(e);
62 |
63 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
64 | {
65 | //TODO: Load state from previously suspended application
66 | }
67 |
68 | // Place the frame in the current Window
69 | Window.Current.Content = rootFrame;
70 | }
71 |
72 | if (rootFrame.Content == null)
73 | {
74 | // When the navigation stack isn't restored navigate to the first page,
75 | // configuring the new page by passing required information as a navigation
76 | // parameter
77 | rootFrame.Navigate(typeof(MainPage), e.Arguments);
78 | }
79 | // Ensure the current window is active
80 | Window.Current.Activate();
81 | }
82 |
83 | ///
84 | /// Invoked when Navigation to a certain page fails
85 | ///
86 | /// The Frame which failed navigation
87 | /// Details about the navigation failure
88 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
89 | {
90 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
91 | }
92 |
93 | ///
94 | /// Invoked when application execution is being suspended. Application state is saved
95 | /// without knowing whether the application will be terminated or resumed with the contents
96 | /// of memory still intact.
97 | ///
98 | /// The source of the suspend request.
99 | /// Details about the suspend request.
100 | private void OnSuspending(object sender, SuspendingEventArgs e)
101 | {
102 | var deferral = e.SuspendingOperation.GetDeferral();
103 | //TODO: Save application state and stop any background activity
104 | deferral.Complete();
105 | }
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Backup/SampleApp.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {34CEE419-5065-4724-8BB5-B69748B3C856}
8 | AppContainerExe
9 | Properties
10 | SampleApp.UWP
11 | SampleApp.UWP
12 | en-US
13 | UAP
14 | 10.0.14393.0
15 | 10.0.14393.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | Windows_TemporaryKey.pfx
21 |
22 |
23 | true
24 | bin\ARM\Debug\
25 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
26 | ;2008
27 | full
28 | ARM
29 | false
30 | prompt
31 | true
32 |
33 |
34 | bin\ARM\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | true
37 | ;2008
38 | pdbonly
39 | ARM
40 | false
41 | prompt
42 | true
43 | true
44 |
45 |
46 | true
47 | bin\x64\Debug\
48 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
49 | ;2008
50 | full
51 | x64
52 | false
53 | prompt
54 | true
55 |
56 |
57 | bin\x64\Release\
58 | TRACE;NETFX_CORE;WINDOWS_UWP
59 | true
60 | ;2008
61 | pdbonly
62 | x64
63 | false
64 | prompt
65 | true
66 | true
67 |
68 |
69 | true
70 | bin\x86\Debug\
71 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
72 | ;2008
73 | full
74 | x86
75 | false
76 | prompt
77 | true
78 |
79 |
80 | bin\x86\Release\
81 | TRACE;NETFX_CORE;WINDOWS_UWP
82 | true
83 | ;2008
84 | pdbonly
85 | x86
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | App.xaml
98 |
99 |
100 | MainPage.xaml
101 |
102 |
103 |
104 |
105 |
106 | Designer
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | MSBuild:Compile
123 | Designer
124 |
125 |
126 | MSBuild:Compile
127 | Designer
128 |
129 |
130 |
131 |
132 | {08d09329-a33f-4a32-986c-a9f274099bee}
133 | Xam.Plugin.UWP
134 |
135 |
136 | {8ced5218-382e-44f4-8699-d366d30ff168}
137 | Xam.Plugin
138 |
139 |
140 | {789fe89c-9ee1-4843-b680-14af22e15515}
141 | SampleApp
142 |
143 |
144 |
145 | 14.0
146 |
147 |
148 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Backup/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
4 | "Xamarin.Forms": "2.3.4.247"
5 | },
6 | "frameworks": {
7 | "uap10.0": {}
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 | }
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace SampleApp.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new SampleApp.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | SampleApp.UWP
18 | ryan.dixon
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 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.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("SampleApp.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SampleApp.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/SampleApp.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x86
7 | {34CEE419-5065-4724-8BB5-B69748B3C856}
8 | AppContainerExe
9 | Properties
10 | SampleApp.UWP
11 | SampleApp.UWP
12 | en-US
13 | UAP
14 | 10.0.15063.0
15 | 10.0.10240.0
16 | 14
17 | true
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | Windows_TemporaryKey.pfx
21 | win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot
22 |
23 |
24 | true
25 | bin\ARM\Debug\
26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
27 | ;2008
28 | full
29 | ARM
30 | false
31 | prompt
32 | true
33 |
34 |
35 | bin\ARM\Release\
36 | TRACE;NETFX_CORE;WINDOWS_UWP
37 | true
38 | ;2008
39 | pdbonly
40 | ARM
41 | false
42 | prompt
43 | true
44 | true
45 |
46 |
47 | true
48 | bin\x64\Debug\
49 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
50 | ;2008
51 | full
52 | x64
53 | false
54 | prompt
55 | true
56 |
57 |
58 | bin\x64\Release\
59 | TRACE;NETFX_CORE;WINDOWS_UWP
60 | true
61 | ;2008
62 | pdbonly
63 | x64
64 | false
65 | prompt
66 | true
67 | true
68 |
69 |
70 | true
71 | bin\x86\Debug\
72 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
73 | ;2008
74 | full
75 | x86
76 | false
77 | prompt
78 | true
79 |
80 |
81 | bin\x86\Release\
82 | TRACE;NETFX_CORE;WINDOWS_UWP
83 | true
84 | ;2008
85 | pdbonly
86 | x86
87 | false
88 | prompt
89 | true
90 | true
91 |
92 |
93 |
94 | App.xaml
95 |
96 |
97 | MainPage.xaml
98 |
99 |
100 |
101 |
102 |
103 | Designer
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | MSBuild:Compile
120 | Designer
121 |
122 |
123 | MSBuild:Compile
124 | Designer
125 |
126 |
127 |
128 |
129 | {08d09329-a33f-4a32-986c-a9f274099bee}
130 | Xam.Plugin.UWP
131 |
132 |
133 | {8ced5218-382e-44f4-8699-d366d30ff168}
134 | Xam.Plugin
135 |
136 |
137 | {789fe89c-9ee1-4843-b680-14af22e15515}
138 | SampleApp
139 |
140 |
141 |
142 |
143 | 5.1.0
144 |
145 |
146 | 2.3.4.247
147 |
148 |
149 |
150 | 14.0
151 |
152 |
153 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/SampleApp.UWP.nuget.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(UserProfile)\.nuget\packages\
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.UWP/Windows_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.UWP/Windows_TemporaryKey.pfx
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Media.Animation;
17 | using Windows.UI.Xaml.Navigation;
18 |
19 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
20 |
21 | namespace SampleApp.WinPhone
22 | {
23 | ///
24 | /// Provides application-specific behavior to supplement the default Application class.
25 | ///
26 | public sealed partial class App : Application
27 | {
28 | private TransitionCollection transitions;
29 |
30 | ///
31 | /// Initializes the singleton application object. This is the first line of authored code
32 | /// executed, and as such is the logical equivalent of main() or WinMain().
33 | ///
34 | public App()
35 | {
36 | this.InitializeComponent();
37 | this.Suspending += this.OnSuspending;
38 | }
39 |
40 | ///
41 | /// Invoked when the application is launched normally by the end user. Other entry points
42 | /// will be used when the application is launched to open a specific file, to display
43 | /// search results, and so forth.
44 | ///
45 | /// Details about the launch request and process.
46 | protected override void OnLaunched(LaunchActivatedEventArgs e)
47 | {
48 | #if DEBUG
49 | if (System.Diagnostics.Debugger.IsAttached)
50 | {
51 | this.DebugSettings.EnableFrameRateCounter = true;
52 | }
53 | #endif
54 |
55 | Frame rootFrame = Window.Current.Content as Frame;
56 |
57 | // Do not repeat app initialization when the Window already has content,
58 | // just ensure that the window is active
59 | if (rootFrame == null)
60 | {
61 | // Create a Frame to act as the navigation context and navigate to the first page
62 | rootFrame = new Frame();
63 |
64 | // TODO: change this value to a cache size that is appropriate for your application
65 | rootFrame.CacheSize = 1;
66 |
67 | Xamarin.Forms.Forms.Init(e);
68 |
69 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
70 | {
71 | // TODO: Load state from previously suspended application
72 | }
73 |
74 | // Place the frame in the current Window
75 | Window.Current.Content = rootFrame;
76 | }
77 |
78 | if (rootFrame.Content == null)
79 | {
80 | // Removes the turnstile navigation for startup.
81 | if (rootFrame.ContentTransitions != null)
82 | {
83 | this.transitions = new TransitionCollection();
84 | foreach (var c in rootFrame.ContentTransitions)
85 | {
86 | this.transitions.Add(c);
87 | }
88 | }
89 |
90 | rootFrame.ContentTransitions = null;
91 | rootFrame.Navigated += this.RootFrame_FirstNavigated;
92 |
93 | // When the navigation stack isn't restored navigate to the first page,
94 | // configuring the new page by passing required information as a navigation
95 | // parameter
96 | if (!rootFrame.Navigate(typeof(MainPage), e.Arguments))
97 | {
98 | throw new Exception("Failed to create initial page");
99 | }
100 | }
101 |
102 | // Ensure the current window is active
103 | Window.Current.Activate();
104 | }
105 |
106 | ///
107 | /// Restores the content transitions after the app has launched.
108 | ///
109 | /// The object where the handler is attached.
110 | /// Details about the navigation event.
111 | private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e)
112 | {
113 | var rootFrame = sender as Frame;
114 | rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() };
115 | rootFrame.Navigated -= this.RootFrame_FirstNavigated;
116 | }
117 |
118 | ///
119 | /// Invoked when application execution is being suspended. Application state is saved
120 | /// without knowing whether the application will be terminated or resumed with the contents
121 | /// of memory still intact.
122 | ///
123 | /// The source of the suspend request.
124 | /// Details about the suspend request.
125 | private void OnSuspending(object sender, SuspendingEventArgs e)
126 | {
127 | var deferral = e.SuspendingOperation.GetDeferral();
128 |
129 | // TODO: Save application state and stop any background activity
130 | deferral.Complete();
131 | }
132 | }
133 | }
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/Logo.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/SmallLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/SmallLogo.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/SplashScreen.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/SplashScreen.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/Square71x71Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/Square71x71Logo.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/StoreLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/StoreLogo.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Assets/WideLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.WinPhone/Assets/WideLogo.scale-240.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/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=234238
17 |
18 | namespace SampleApp.WinPhone
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
24 | {
25 | public MainPage()
26 | {
27 | this.InitializeComponent();
28 |
29 | this.NavigationCacheMode = NavigationCacheMode.Required;
30 |
31 | LoadApplication(new SampleApp.App());
32 | }
33 |
34 | ///
35 | /// Invoked when this page is about to be displayed in a Frame.
36 | ///
37 | /// Event data that describes how this page was reached.
38 | /// This parameter is typically used to configure the page.
39 | protected override void OnNavigatedTo(NavigationEventArgs e)
40 | {
41 | // TODO: Prepare page for display here.
42 |
43 | // TODO: If your application contains multiple pages, ensure that you are
44 | // handling the hardware Back button by registering for the
45 | // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
46 | // If you are using the NavigationHelper provided by some templates,
47 | // this event is handled for you.
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 | SampleApp.WinPhone
12 | ryan.dixon
13 | Assets\StoreLogo.png
14 |
15 |
16 |
17 | 6.3.1
18 | 6.3.1
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/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("SampleApp.WinPhone.WindowsPhone")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SampleApp.WinPhone.WindowsPhone")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/SampleApp.WinPhone.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {1B1E1015-2483-40B8-BB17-C233DE7C5399}
8 | AppContainerExe
9 | Properties
10 | SampleApp.WinPhone
11 | SampleApp.WinPhone
12 | en-US
13 | 8.1
14 | 12
15 | 512
16 | {76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 | true
18 |
19 |
20 |
21 |
22 | AnyCPU
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
28 | prompt
29 | 4
30 |
31 |
32 | AnyCPU
33 | pdbonly
34 | true
35 | bin\Release\
36 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
37 | prompt
38 | 4
39 |
40 |
41 | true
42 | bin\ARM\Debug\
43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
44 | ;2008
45 | full
46 | ARM
47 | false
48 | prompt
49 | true
50 |
51 |
52 | bin\ARM\Release\
53 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
54 | true
55 | ;2008
56 | pdbonly
57 | ARM
58 | false
59 | prompt
60 | true
61 |
62 |
63 | true
64 | bin\x86\Debug\
65 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
66 | ;2008
67 | full
68 | x86
69 | false
70 | prompt
71 | true
72 |
73 |
74 | bin\x86\Release\
75 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
76 | true
77 | ;2008
78 | pdbonly
79 | x86
80 | false
81 | prompt
82 | true
83 |
84 |
85 |
86 | App.xaml
87 |
88 |
89 | MainPage.xaml
90 |
91 |
92 |
93 |
94 |
95 | Designer
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | Designer
109 |
110 |
111 | MSBuild:Compile
112 | Designer
113 |
114 |
115 |
116 |
117 | {d8b6b84f-a10b-421e-9864-45918a74e4e3}
118 | Xam.Plugin.WindowsPhone
119 |
120 |
121 | {8ced5218-382e-44f4-8699-d366d30ff168}
122 | Xam.Plugin
123 |
124 |
125 | {789fe89c-9ee1-4843-b680-14af22e15515}
126 | SampleApp
127 |
128 |
129 |
130 |
131 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Core.dll
132 | True
133 |
134 |
135 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.dll
136 | True
137 |
138 |
139 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.WinRT.dll
140 | True
141 |
142 |
143 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.WinRT.Phone.dll
144 | True
145 |
146 |
147 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Xaml.dll
148 | True
149 |
150 |
151 |
152 |
153 |
154 |
155 | 12.0
156 |
157 |
158 | WindowsPhoneApp
159 |
160 |
161 |
162 |
163 |
164 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
165 |
166 |
167 |
168 |
175 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/SampleApp.WinPhone.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A6BAF594-9315-40C3-AD16-F5B8A425A7AB
5 |
6 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.WinPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.ApplicationModel;
7 | using Windows.ApplicationModel.Activation;
8 | using Windows.Foundation;
9 | using Windows.Foundation.Collections;
10 | using Windows.UI.Xaml;
11 | using Windows.UI.Xaml.Controls;
12 | using Windows.UI.Xaml.Controls.Primitives;
13 | using Windows.UI.Xaml.Data;
14 | using Windows.UI.Xaml.Input;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Media.Animation;
17 | using Windows.UI.Xaml.Navigation;
18 |
19 | // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
20 |
21 | namespace SampleApp.Windows
22 | {
23 | ///
24 | /// Provides application-specific behavior to supplement the default Application class.
25 | ///
26 | public sealed partial class App : Application
27 | {
28 | ///
29 | /// Initializes the singleton application object. This is the first line of authored code
30 | /// executed, and as such is the logical equivalent of main() or WinMain().
31 | ///
32 | public App()
33 | {
34 | this.InitializeComponent();
35 | this.Suspending += this.OnSuspending;
36 | }
37 |
38 | ///
39 | /// Invoked when the application is launched normally by the end user. Other entry points
40 | /// will be used when the application is launched to open a specific file, to display
41 | /// search results, and so forth.
42 | ///
43 | /// Details about the launch request and process.
44 | protected override void OnLaunched(LaunchActivatedEventArgs e)
45 | {
46 | #if DEBUG
47 | if (System.Diagnostics.Debugger.IsAttached)
48 | {
49 | this.DebugSettings.EnableFrameRateCounter = true;
50 | }
51 | #endif
52 |
53 | Frame rootFrame = Window.Current.Content as Frame;
54 |
55 | // Do not repeat app initialization when the Window already has content,
56 | // just ensure that the window is active
57 | if (rootFrame == null)
58 | {
59 | // Create a Frame to act as the navigation context and navigate to the first page
60 | rootFrame = new Frame();
61 |
62 | // TODO: change this value to a cache size that is appropriate for your application
63 | rootFrame.CacheSize = 1;
64 |
65 | Xamarin.Forms.Forms.Init(e);
66 |
67 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
68 | {
69 | // TODO: Load state from previously suspended application
70 | }
71 |
72 | // Place the frame in the current Window
73 | Window.Current.Content = rootFrame;
74 | }
75 |
76 | if (rootFrame.Content == null)
77 | {
78 | // When the navigation stack isn't restored navigate to the first page,
79 | // configuring the new page by passing required information as a navigation
80 | // parameter
81 | if (!rootFrame.Navigate(typeof(MainPage), e.Arguments))
82 | {
83 | throw new Exception("Failed to create initial page");
84 | }
85 | }
86 |
87 | // Ensure the current window is active
88 | Window.Current.Activate();
89 | }
90 |
91 | ///
92 | /// Invoked when application execution is being suspended. Application state is saved
93 | /// without knowing whether the application will be terminated or resumed with the contents
94 | /// of memory still intact.
95 | ///
96 | /// The source of the suspend request.
97 | /// Details about the suspend request.
98 | private void OnSuspending(object sender, SuspendingEventArgs e)
99 | {
100 | var deferral = e.SuspendingOperation.GetDeferral();
101 |
102 | // TODO: Save application state and stop any background activity
103 | deferral.Complete();
104 | }
105 | }
106 | }
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Windows/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Windows/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Windows/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Windows/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace SampleApp.Windows
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new SampleApp.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | SampleApp.Windows
10 | ryan.dixon
11 | Assets\StoreLogo.png
12 |
13 |
14 |
15 | 6.3.0
16 | 6.3.0
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/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("SampleApp.Windows.Windows")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SampleApp.Windows.Windows")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/Windows_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.Windows/Windows_TemporaryKey.pfx
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.Windows/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SampleApp.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | Xam.Plugin.iOS.PopupEffect.Init();
27 |
28 | LoadApplication(new App());
29 |
30 | return base.FinishedLaunching(app, options);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 6.0
25 | CFBundleDisplayName
26 | SampleApp
27 | CFBundleIdentifier
28 | com.yourcompany.SampleApp
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x
34 | Icon-60@3x
35 | Icon-76
36 | Icon-76@2x
37 | Default
38 | Default@2x
39 | Default-568h@2x
40 | Default-Portrait
41 | Default-Portrait@2x
42 | Icon-Small-40
43 | Icon-Small-40@2x
44 | Icon-Small-40@3x
45 | Icon-Small
46 | Icon-Small@2x
47 | Icon-Small@3x
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen
51 |
52 |
53 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace SampleApp.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SampleApp.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SampleApp.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/SampleApp.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {AA98B2D3-9A0C-4472-862D-D1FED8911E4E}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Exe
11 | SampleApp.iOS
12 | Resources
13 | SampleApp.iOS
14 |
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\iPhoneSimulator\Debug
22 | DEBUG
23 | prompt
24 | 4
25 | false
26 | i386, x86_64
27 | None
28 | true
29 |
30 |
31 | none
32 | true
33 | bin\iPhoneSimulator\Release
34 | prompt
35 | 4
36 | None
37 | i386, x86_64
38 | false
39 |
40 |
41 | true
42 | full
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | false
49 | ARMv7, ARM64
50 | iPhone Developer
51 | true
52 | Entitlements.plist
53 |
54 |
55 | none
56 | true
57 | bin\iPhone\Release
58 | prompt
59 | 4
60 | ARMv7, ARM64
61 | false
62 | iPhone Developer
63 | Entitlements.plist
64 |
65 |
66 | none
67 | True
68 | bin\iPhone\Ad-Hoc
69 | prompt
70 | 4
71 | False
72 | ARMv7, ARM64
73 | True
74 | Automatic:AdHoc
75 | iPhone Distribution
76 | Entitlements.plist
77 |
78 |
79 | none
80 | True
81 | bin\iPhone\AppStore
82 | prompt
83 | 4
84 | False
85 | ARMv7, ARM64
86 | Automatic:AppStore
87 | iPhone Distribution
88 | Entitlements.plist
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
124 | True
125 |
126 |
127 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
128 | True
129 |
130 |
131 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
132 | True
133 |
134 |
135 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
136 | True
137 |
138 |
139 |
140 |
141 |
142 | {14f70c11-966d-469e-b507-66f5b9172056}
143 | Xam.Plugin.iOS
144 | false
145 | false
146 |
147 |
148 | {8ced5218-382e-44f4-8699-d366d30ff168}
149 | Xam.Plugin
150 |
151 |
152 | {789fe89c-9ee1-4843-b680-14af22e15515}
153 | SampleApp
154 |
155 |
156 |
157 |
158 |
159 |
160 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
161 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/SampleApp.iOS.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Simulator
5 | iPhone 6s iOS 10.3
6 |
7 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/iTunesArtwork
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/SampleApp/SampleApp/SampleApp.iOS/iTunesArtwork@2x
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/App.cs:
--------------------------------------------------------------------------------
1 | using SampleApp.Views;
2 | using Xamarin.Forms;
3 |
4 | namespace SampleApp
5 | {
6 | public class App : Application
7 | {
8 | public App()
9 | {
10 | MainPage = new CodeExample();
11 | // MainPage = new XamlExample();
12 | }
13 |
14 | protected override void OnStart()
15 | {
16 | // Handle when your app starts
17 | }
18 |
19 | protected override void OnSleep()
20 | {
21 | // Handle when your app sleeps
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | // Handle when your app resumes
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("SampleApp")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("SampleApp")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/SampleApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 11.0
6 | Debug
7 | AnyCPU
8 | {789FE89C-9EE1-4843-B680-14AF22E15515}
9 | Library
10 | Properties
11 | SampleApp
12 | SampleApp
13 | 512
14 | v4.5
15 | Profile259
16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | XamlExample.xaml
44 |
45 |
46 |
47 |
48 | {8ced5218-382e-44f4-8699-d366d30ff168}
49 | Xam.Plugin
50 |
51 |
52 |
53 |
54 |
55 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll
56 | True
57 |
58 |
59 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll
60 | True
61 |
62 |
63 | ..\..\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll
64 | True
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | MSBuild:UpdateDesignTimeXaml
73 | Designer
74 |
75 |
76 |
77 |
78 |
79 |
80 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/ViewModels/SampleViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace SampleApp.ViewModels
4 | {
5 | public class SampleViewModel
6 | {
7 |
8 | #region singleton
9 | public static SampleViewModel Instance => _instance ?? (_instance = new SampleViewModel());
10 | static SampleViewModel _instance;
11 | SampleViewModel()
12 | {
13 | ListItems.Add("Item 1");
14 | ListItems.Add("This is the second item");
15 | ListItems.Add("3rd Item <3");
16 | }
17 | #endregion
18 |
19 | #region fields
20 | IList _listItems = new List();
21 | #endregion
22 |
23 | #region properties
24 | public IList ListItems
25 | {
26 | get { return _listItems; }
27 | set { _listItems = value; }
28 | }
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/Views/CodeExample.cs:
--------------------------------------------------------------------------------
1 | using SampleApp.ViewModels;
2 | using Xam.Plugin;
3 | using Xamarin.Forms;
4 |
5 | namespace SampleApp.Views
6 | {
7 | public class CodeExample : ContentPage
8 | {
9 |
10 | public SampleViewModel ViewModel => SampleViewModel.Instance;
11 | public StackLayout MainLayout;
12 | public Button ShowPopup;
13 | public PopupMenu Popup;
14 |
15 | public CodeExample()
16 | {
17 | BindingContext = ViewModel;
18 | Popup = new PopupMenu();
19 |
20 | MainLayout = new StackLayout()
21 | {
22 | BackgroundColor = Color.Red.WithLuminosity(0.8).WithSaturation(0.8)
23 | };
24 |
25 | ShowPopup = new Button()
26 | {
27 | HorizontalOptions = LayoutOptions.CenterAndExpand,
28 | VerticalOptions = LayoutOptions.CenterAndExpand,
29 | BackgroundColor = Color.Blue.WithLuminosity(0.8).WithSaturation(0.8),
30 | TextColor = Color.White,
31 | Text = "Click me to open menu"
32 | };
33 |
34 | ShowPopup.Clicked += (sender, args) => Popup?.ShowPopup(sender as Button);
35 | Popup.BindingContext = ViewModel;
36 | Popup.SetBinding(PopupMenu.ItemsSourceProperty, "ListItems");
37 |
38 | MainLayout.Children.Add(ShowPopup);
39 | Content = MainLayout;
40 | }
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/Views/XamlExample.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
10 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/Views/XamlExample.xaml.cs:
--------------------------------------------------------------------------------
1 | using SampleApp.ViewModels;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Linq;
6 | using System.Runtime.CompilerServices;
7 | using System.Text;
8 | using Xam.Plugin;
9 | using Xamarin.Forms;
10 | using Xamarin.Forms.Xaml;
11 |
12 | namespace SampleApp.Views
13 | {
14 |
15 | [XamlCompilation(XamlCompilationOptions.Compile)]
16 | public partial class XamlExample : ContentPage
17 | {
18 |
19 | public SampleViewModel ViewModel => SampleViewModel.Instance;
20 | public PopupMenu Popup;
21 |
22 | public XamlExample()
23 | {
24 | InitializeComponent();
25 |
26 | Popup = new PopupMenu()
27 | {
28 | BindingContext = ViewModel
29 | };
30 |
31 | Popup.SetBinding(PopupMenu.ItemsSourceProperty, "ListItems");
32 | }
33 |
34 | void ShowPopup_Clicked(object sender, EventArgs e) => Popup?.ShowPopup(sender as View);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/SampleApp/SampleApp/SampleApp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Extensions/ViewExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using System.Linq;
3 | using System.Reflection;
4 | using Xamarin.Forms;
5 |
6 | namespace Xam.Plugin.Droid.Extensions
7 | {
8 | using NativeView = Android.Views.View;
9 | public static class ViewExtensions
10 | {
11 |
12 | ///
13 | /// Gets the content of the native.
14 | ///
15 | /// The view.
16 | /// NativeView.
17 | public static NativeView GetNativeContent(this View view)
18 | {
19 | PropertyInfo controlProperty = view.GetType().GetProperty("Control", BindingFlags.Public | BindingFlags.Instance);
20 | return (controlProperty == null) ? null : controlProperty.GetValue(view) as NativeView;
21 | }
22 |
23 | }
24 | }
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/PopupEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Platform.Android;
5 | using Xam.Plugin.Droid;
6 | using Android.Views;
7 | using static Xam.Plugin.PopupMenu;
8 |
9 | [assembly: ResolutionGroupName("Xam.Plugin")]
10 | [assembly: ExportEffect(typeof(PopupEffect), "PopupEffect")]
11 | namespace Xam.Plugin.Droid
12 | {
13 | public class PopupEffect : PlatformEffect
14 | {
15 |
16 | Android.Widget.PopupMenu ToggleMenu;
17 | InternalPopupEffect Effect;
18 |
19 | public static void Init()
20 | {
21 | var now = DateTime.Now;
22 | }
23 |
24 | protected override void OnAttached()
25 | {
26 | Effect = (InternalPopupEffect) Element.Effects.FirstOrDefault(e => e is InternalPopupEffect);
27 |
28 | if (Effect != null)
29 | Effect.Parent.OnPopupRequest += OnPopupRequest;
30 |
31 | if (Control != null)
32 | {
33 | ToggleMenu = new Android.Widget.PopupMenu(Forms.Context, Control);
34 | ToggleMenu.MenuItemClick += MenuItemClick;
35 | }
36 |
37 | else if (Container != null)
38 | {
39 | ToggleMenu = new Android.Widget.PopupMenu(Forms.Context, Container);
40 | ToggleMenu.MenuItemClick += MenuItemClick;
41 | }
42 | }
43 |
44 | void OnPopupRequest(Xamarin.Forms.View view)
45 | {
46 | // Null Check
47 | if (Effect.Parent.ItemsSource == null)
48 | return;
49 |
50 | // Clear Old
51 | ToggleMenu.Menu.Clear();
52 |
53 | // Add New
54 | foreach (var item in Effect.Parent.ItemsSource)
55 | ToggleMenu.Menu.Add(item.ToString());
56 |
57 | // Popup
58 | ToggleMenu.Show();
59 | }
60 |
61 | protected override void OnDetached()
62 | {
63 | if (ToggleMenu != null)
64 | ToggleMenu.MenuItemClick -= MenuItemClick;
65 |
66 | if (Effect != null)
67 | Effect.Parent.OnPopupRequest -= OnPopupRequest;
68 | }
69 |
70 | void MenuItemClick(object sender, Android.Widget.PopupMenu.MenuItemClickEventArgs e) => Effect?.Parent.InvokeItemSelected(e.Item.ToString());
71 | }
72 | }
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Xam.Plugin.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Xam.Plugin.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2017")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SKLn-Rad/Xam.Plugin.PopupMenu/dca3f01da420fb5e3b52d457922e2e2860e81baa/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Resources/Resource.Designer.cs
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Xam.Plugin.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {649559C6-1971-4B2E-B433-7CCE59F8CE78}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | Xam.Plugin.Droid
13 | Xam.Plugin.Droid
14 | 512
15 | Resources\Resource.Designer.cs
16 | Off
17 | True
18 | v7.1
19 |
20 |
21 |
22 |
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE
28 | prompt
29 | 4
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\FormsViewGroup.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | ..\..\SampleApp\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
52 | True
53 |
54 |
55 | ..\..\SampleApp\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
56 | True
57 |
58 |
59 | ..\..\SampleApp\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
60 | True
61 |
62 |
63 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
64 | True
65 |
66 |
67 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
68 | True
69 |
70 |
71 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
72 | True
73 |
74 |
75 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
76 | True
77 |
78 |
79 | ..\..\SampleApp\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
80 | True
81 |
82 |
83 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Core.dll
84 | True
85 |
86 |
87 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
88 | True
89 |
90 |
91 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
92 | True
93 |
94 |
95 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
96 | True
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | {8ced5218-382e-44f4-8699-d366d30ff168}
110 | Xam.Plugin
111 |
112 |
113 |
114 |
115 |
116 |
117 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
118 |
119 |
120 |
121 |
122 |
123 |
130 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/Xam.Plugin.Droid.csproj.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {649559C6-1971-4B2E-B433-7CCE59F8CE78}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | Xam.Plugin.Droid
13 | Xam.Plugin.Droid
14 | 512
15 | Resources\Resource.Designer.cs
16 | Off
17 | True
18 | v7.0
19 |
20 |
21 |
22 |
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE
28 | prompt
29 | 4
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 |
39 |
40 |
41 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\FormsViewGroup.dll
42 | True
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | ..\..\SampleApp\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll
52 | True
53 |
54 |
55 | ..\..\SampleApp\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll
56 | True
57 |
58 |
59 | ..\..\SampleApp\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
60 | True
61 |
62 |
63 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
64 | True
65 |
66 |
67 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
68 | True
69 |
70 |
71 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
72 | True
73 |
74 |
75 | ..\..\SampleApp\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
76 | True
77 |
78 |
79 | ..\..\SampleApp\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll
80 | True
81 |
82 |
83 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Core.dll
84 | True
85 |
86 |
87 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
88 | True
89 |
90 |
91 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
92 | True
93 |
94 |
95 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.3.180\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
96 | True
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | {8ced5218-382e-44f4-8699-d366d30ff168}
115 | Xam.Plugin
116 |
117 |
118 |
119 |
120 |
121 |
122 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
123 |
124 |
125 |
126 |
127 |
128 |
135 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Shared/PopupEffect.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using Xam.Plugin;
6 | using Xam.Plugin.Shared;
7 | using Xamarin.Forms;
8 | using Windows.UI.Xaml.Controls;
9 | using System.Diagnostics;
10 | using System.Collections.Specialized;
11 | using static Xam.Plugin.PopupMenu;
12 |
13 | #if WINDOWS_UWP
14 | using Xamarin.Forms.Platform.UWP;
15 | #else
16 | using Xamarin.Forms.Platform.WinRT;
17 | #endif
18 |
19 | [assembly: ResolutionGroupName("Xam.Plugin")]
20 | [assembly: ExportEffect(typeof(Xam.Plugin.Shared.PopupEffect), "PopupEffect")]
21 | namespace Xam.Plugin.Shared
22 | {
23 | public class PopupEffect : PlatformEffect
24 | {
25 |
26 | MenuFlyout ToggleMenu;
27 | InternalPopupEffect Effect;
28 |
29 | public static void Init()
30 | {
31 | var now = DateTime.Now;
32 | }
33 |
34 | protected override void OnAttached()
35 | {
36 | Effect = (InternalPopupEffect)Element.Effects.FirstOrDefault(e => e is InternalPopupEffect);
37 |
38 | if (Effect != null)
39 | Effect.Parent.OnPopupRequest += OnPopupRequest;
40 |
41 | if (Control != null || Container != null)
42 | ToggleMenu = new MenuFlyout();
43 | }
44 |
45 | void OnElementClicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
46 | {
47 | Effect?.Parent.InvokeItemSelected(((MenuFlyoutItem)sender).Text);
48 | }
49 |
50 | void OnPopupRequest(View view)
51 | {
52 | // Null Check
53 | if (Effect.Parent.ItemsSource == null)
54 | return;
55 |
56 | // Clear Old
57 | foreach (var item in ToggleMenu.Items)
58 | ((MenuFlyoutItem)item).Click -= OnElementClicked;
59 | ToggleMenu.Items.Clear();
60 |
61 | // Add New
62 | foreach (var item in Effect.Parent.ItemsSource)
63 | {
64 | MenuFlyoutItem Item = new MenuFlyoutItem();
65 | Item.Text = item.ToString();
66 | Item.Click += OnElementClicked;
67 | ToggleMenu.Items.Add(Item);
68 | }
69 |
70 | // Popup
71 | if (Control != null)
72 | ToggleMenu.ShowAt(Control);
73 |
74 | else if (Container != null)
75 | ToggleMenu.ShowAt(Container);
76 | }
77 |
78 | protected override void OnDetached()
79 | {
80 | if (Effect != null)
81 | Effect.Parent.OnPopupRequest -= OnPopupRequest;
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Shared/Xam.Plugin.Shared.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | d0eddc64-73fd-4d76-98d6-ac66dff7561b
7 |
8 |
9 | Xam.Plugin.Shared
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.Shared/Xam.Plugin.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | d0eddc64-73fd-4d76-98d6-ac66dff7561b
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.UWP/Backup/Xam.Plugin.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {08D09329-A33F-4A32-986C-A9F274099BEE}
8 | Library
9 | Properties
10 | Xam.Plugin.UWP
11 | Xam.Plugin.UWP
12 | en-US
13 | UAP
14 | 10.0.14393.0
15 | 10.0.10240.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 |
20 |
21 | AnyCPU
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
27 | prompt
28 | 4
29 |
30 |
31 | AnyCPU
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE;NETFX_CORE;WINDOWS_UWP
36 | prompt
37 | 4
38 |
39 |
40 | x86
41 | true
42 | bin\x86\Debug\
43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
44 | ;2008
45 | full
46 | x86
47 | false
48 | prompt
49 |
50 |
51 | x86
52 | bin\x86\Release\
53 | TRACE;NETFX_CORE;WINDOWS_UWP
54 | true
55 | ;2008
56 | pdbonly
57 | x86
58 | false
59 | prompt
60 |
61 |
62 | ARM
63 | true
64 | bin\ARM\Debug\
65 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
66 | ;2008
67 | full
68 | ARM
69 | false
70 | prompt
71 |
72 |
73 | ARM
74 | bin\ARM\Release\
75 | TRACE;NETFX_CORE;WINDOWS_UWP
76 | true
77 | ;2008
78 | pdbonly
79 | ARM
80 | false
81 | prompt
82 |
83 |
84 | x64
85 | true
86 | bin\x64\Debug\
87 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
88 | ;2008
89 | full
90 | x64
91 | false
92 | prompt
93 |
94 |
95 | x64
96 | bin\x64\Release\
97 | TRACE;NETFX_CORE;WINDOWS_UWP
98 | true
99 | ;2008
100 | pdbonly
101 | x64
102 | false
103 | prompt
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | {8CED5218-382E-44F4-8699-D366D30FF168}
116 | Xam.Plugin
117 |
118 |
119 |
120 |
121 | 14.0
122 |
123 |
124 |
131 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.UWP/Backup/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
4 | "Xamarin.Forms": "2.3.4.247"
5 | },
6 | "frameworks": {
7 | "uap10.0": {}
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 | }
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.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("Xam.Plugin.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Xam.Plugin.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
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)]
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.UWP/Properties/Xam.Plugin.UWP.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.UWP/Xam.Plugin.UWP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {08D09329-A33F-4A32-986C-A9F274099BEE}
8 | Library
9 | Properties
10 | Xam.Plugin.UWP
11 | Xam.Plugin.UWP
12 | en-US
13 | UAP
14 | 10.0.15063.0
15 | 10.0.10240.0
16 | 14
17 | 512
18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 | win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot
20 |
21 |
22 | AnyCPU
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
28 | prompt
29 | 4
30 |
31 |
32 | AnyCPU
33 | pdbonly
34 | true
35 | bin\Release\
36 | TRACE;NETFX_CORE;WINDOWS_UWP
37 | prompt
38 | 4
39 |
40 |
41 | x86
42 | true
43 | bin\x86\Debug\
44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
45 | ;2008
46 | full
47 | x86
48 | false
49 | prompt
50 |
51 |
52 | x86
53 | bin\x86\Release\
54 | TRACE;NETFX_CORE;WINDOWS_UWP
55 | true
56 | ;2008
57 | pdbonly
58 | x86
59 | false
60 | prompt
61 |
62 |
63 | ARM
64 | true
65 | bin\ARM\Debug\
66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
67 | ;2008
68 | full
69 | ARM
70 | false
71 | prompt
72 |
73 |
74 | ARM
75 | bin\ARM\Release\
76 | TRACE;NETFX_CORE;WINDOWS_UWP
77 | true
78 | ;2008
79 | pdbonly
80 | ARM
81 | false
82 | prompt
83 |
84 |
85 | x64
86 | true
87 | bin\x64\Debug\
88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
89 | ;2008
90 | full
91 | x64
92 | false
93 | prompt
94 |
95 |
96 | x64
97 | bin\x64\Release\
98 | TRACE;NETFX_CORE;WINDOWS_UWP
99 | true
100 | ;2008
101 | pdbonly
102 | x64
103 | false
104 | prompt
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | {8CED5218-382E-44F4-8699-D366D30FF168}
113 | Xam.Plugin
114 |
115 |
116 |
117 |
118 | 5.1.0
119 |
120 |
121 | 2.3.4.247
122 |
123 |
124 |
125 |
126 | 14.0
127 |
128 |
129 |
136 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.UWP/Xam.Plugin.UWP.nuget.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(UserProfile)\.nuget\packages\
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsPhone/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("Xam.Plugin.WindowsPhone")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Xam.Plugin.WindowsPhone")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
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)]
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsPhone/Xam.Plugin.WindowsPhone.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 8.0.30703
8 | 2.0
9 | {D8B6B84F-A10B-421E-9864-45918A74E4E3}
10 | Library
11 | Properties
12 | Xam.Plugin.WindowsPhone
13 | Xam.Plugin.WindowsPhone
14 | en-US
15 | 8.1
16 | 12
17 | 512
18 | {76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 |
20 |
21 |
22 |
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
28 | prompt
29 | 4
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
36 | prompt
37 | 4
38 |
39 |
40 | true
41 | bin\ARM\Debug\
42 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
43 | ;2008
44 | full
45 | ARM
46 | false
47 | prompt
48 | true
49 |
50 |
51 | bin\ARM\Release\
52 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
53 | true
54 | ;2008
55 | pdbonly
56 | ARM
57 | false
58 | prompt
59 | true
60 |
61 |
62 | true
63 | bin\x86\Debug\
64 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP
65 | ;2008
66 | full
67 | x86
68 | false
69 | prompt
70 | true
71 |
72 |
73 | bin\x86\Release\
74 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP
75 | true
76 | ;2008
77 | pdbonly
78 | x86
79 | false
80 | prompt
81 | true
82 |
83 |
84 |
85 |
86 | {8ced5218-382e-44f4-8699-d366d30ff168}
87 | Xam.Plugin
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Core.dll
96 | True
97 |
98 |
99 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.dll
100 | True
101 |
102 |
103 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.WinRT.dll
104 | True
105 |
106 |
107 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Platform.WinRT.Phone.dll
108 | True
109 |
110 |
111 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\wpa81\Xamarin.Forms.Xaml.dll
112 | True
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | 12.0
121 |
122 |
123 | WindowsPhoneApp
124 |
125 |
126 |
127 |
128 |
129 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
130 |
131 |
132 |
133 |
140 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsStore/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("Xam.Plugin.WindowsStore")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Xam.Plugin.WindowsStore")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
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)]
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsStore/Xam.Plugin.WindowsStore.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 8.0.30703
8 | 2.0
9 | {7DCF6EC9-1095-4C06-A36F-34D25AA99F85}
10 | Library
11 | Properties
12 | Xam.Plugin.WindowsStore
13 | Xam.Plugin.WindowsStore
14 | en-US
15 | 8.1
16 | 12
17 | 512
18 | {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
19 |
20 |
21 |
22 |
23 | true
24 | full
25 | false
26 | bin\Debug\
27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP
28 | prompt
29 | 4
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE;NETFX_CORE;WINDOWS_APP
36 | prompt
37 | 4
38 |
39 |
40 | true
41 | bin\ARM\Debug\
42 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP
43 | ;2008
44 | full
45 | ARM
46 | false
47 | prompt
48 | true
49 |
50 |
51 | bin\ARM\Release\
52 | TRACE;NETFX_CORE;WINDOWS_APP
53 | true
54 | ;2008
55 | pdbonly
56 | ARM
57 | false
58 | prompt
59 | true
60 |
61 |
62 | true
63 | bin\x64\Debug\
64 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP
65 | ;2008
66 | full
67 | x64
68 | false
69 | prompt
70 | true
71 |
72 |
73 | bin\x64\Release\
74 | TRACE;NETFX_CORE;WINDOWS_APP
75 | true
76 | ;2008
77 | pdbonly
78 | x64
79 | false
80 | prompt
81 | true
82 |
83 |
84 | true
85 | bin\x86\Debug\
86 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP
87 | ;2008
88 | full
89 | x86
90 | false
91 | prompt
92 | true
93 |
94 |
95 | bin\x86\Release\
96 | TRACE;NETFX_CORE;WINDOWS_APP
97 | true
98 | ;2008
99 | pdbonly
100 | x86
101 | false
102 | prompt
103 | true
104 |
105 |
106 |
107 |
108 |
109 |
110 | {8ced5218-382e-44f4-8699-d366d30ff168}
111 | Xam.Plugin
112 |
113 |
114 |
115 |
116 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\win81\Xamarin.Forms.Core.dll
117 | True
118 |
119 |
120 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\win81\Xamarin.Forms.Platform.dll
121 | True
122 |
123 |
124 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\win81\Xamarin.Forms.Platform.WinRT.dll
125 | True
126 |
127 |
128 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\win81\Xamarin.Forms.Platform.WinRT.Tablet.dll
129 | True
130 |
131 |
132 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\win81\Xamarin.Forms.Xaml.dll
133 | True
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | 12.0
142 |
143 |
144 |
145 |
146 |
147 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
148 |
149 |
150 |
151 |
158 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.WindowsStore/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.iOS/PopupEffect.cs:
--------------------------------------------------------------------------------
1 | using CoreGraphics;
2 | using System;
3 | using System.Linq;
4 | using UIKit;
5 | using Xam.Plugin.iOS;
6 | using Xamarin.Forms;
7 | using Xamarin.Forms.Platform.iOS;
8 | using static Xam.Plugin.PopupMenu;
9 |
10 | [assembly: ResolutionGroupName("Xam.Plugin")]
11 | [assembly: ExportEffect(typeof(PopupEffect), "PopupEffect")]
12 | namespace Xam.Plugin.iOS
13 | {
14 | public class PopupEffect : PlatformEffect
15 | {
16 | public static string UIAlertControllerCancelText { get; set; } = "Cancel";
17 | public static UIPopoverArrowDirection PermittedArrowDirections = UIPopoverArrowDirection.Up;
18 |
19 | InternalPopupEffect Effect;
20 | UIViewController RootViewController;
21 |
22 | public static void Init()
23 | {
24 | var now = DateTime.Now;
25 | }
26 |
27 | protected override void OnAttached()
28 | {
29 | Effect = (InternalPopupEffect)Element.Effects.FirstOrDefault(e => e is InternalPopupEffect);
30 |
31 | if (Effect != null)
32 | Effect.Parent.OnPopupRequest += OnPopupRequest;
33 | }
34 |
35 | void OnPopupRequest(View view)
36 | {
37 | if (Effect.Parent.ItemsSource == null)
38 | return;
39 |
40 | RootViewController = UIApplication.SharedApplication.KeyWindow.RootViewController;
41 |
42 | // Create a new Alert Controller
43 | UIAlertController actionSheetAlert = UIAlertController.Create(null, null, UIAlertControllerStyle.ActionSheet);
44 |
45 | // Add Actions
46 | foreach (var item in Effect.Parent.ItemsSource)
47 | actionSheetAlert.AddAction(UIAlertAction.Create(item.ToString(), UIAlertActionStyle.Default, (action) => Effect.Parent.InvokeItemSelected(item.ToString())));
48 |
49 | actionSheetAlert.AddAction(UIAlertAction.Create(UIAlertControllerCancelText, UIAlertActionStyle.Destructive, null));
50 |
51 | // Required for iPad - You must specify a source for the Action Sheet since it is
52 | // displayed as a popover
53 | if (Device.Idiom != TargetIdiom.Phone)
54 | {
55 | UIPopoverPresentationController presentationPopover = actionSheetAlert.PopoverPresentationController;
56 | if (presentationPopover != null)
57 | {
58 | if (Control != null)
59 | {
60 | presentationPopover.SourceRect = Control.Frame;
61 | presentationPopover.SourceView = Control;
62 | }
63 |
64 | else if (Container != null)
65 | {
66 | presentationPopover.SourceRect = Container.Frame;
67 | presentationPopover.SourceView = Container;
68 | }
69 |
70 | else
71 | {
72 | presentationPopover.SourceRect = RootViewController.View.Frame;
73 | presentationPopover.SourceView = RootViewController.View;
74 | }
75 |
76 | presentationPopover.PermittedArrowDirections = PermittedArrowDirections;
77 | }
78 | }
79 |
80 | // Present
81 | RootViewController.PresentViewController(actionSheetAlert, true, null);
82 | }
83 |
84 | protected override void OnDetached()
85 | {
86 | if (Effect != null)
87 | Effect.Parent.OnPopupRequest -= OnPopupRequest;
88 | }
89 | }
90 | }
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Xam.Plugin.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Xam.Plugin.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("14f70c11-966d-469e-b507-66f5b9172056")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.iOS/Xam.Plugin.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {14F70C11-966D-469E-B507-66F5B9172056}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Xam.Plugin.iOS
12 | Resources
13 | Xam.Plugin.iOS
14 |
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug
22 | DEBUG;
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | full
29 | true
30 | bin\Release
31 | prompt
32 | 4
33 | false
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
41 | True
42 |
43 |
44 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
45 | True
46 |
47 |
48 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
49 | True
50 |
51 |
52 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | {8ced5218-382e-44f4-8699-d366d30ff168}
67 | Xam.Plugin
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin/PopupMenu.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using System.Collections;
5 | using System.Collections.Specialized;
6 | using System.Collections.ObjectModel;
7 | using System;
8 |
9 | namespace Xam.Plugin
10 | {
11 | public class PopupMenu : BindableObject
12 | {
13 |
14 | #region events and delegates
15 | public delegate void PopupShowRequestDelegate(View view);
16 | public event PopupShowRequestDelegate OnPopupRequest;
17 |
18 | public delegate void ItemSelectedDelegate(string item);
19 | public event ItemSelectedDelegate OnItemSelected;
20 | #endregion
21 |
22 | #region fields
23 | InternalPopupEffect _internalEffect;
24 |
25 | public static readonly BindableProperty ItemsSourceProperty =
26 | BindableProperty.Create(nameof(ItemsSource), typeof(IList), typeof(PopupMenu), default(IList));
27 | #endregion
28 |
29 | #region properties
30 | public IList ItemsSource
31 | {
32 | get { return (IList) GetValue(ItemsSourceProperty); }
33 | set { SetValue(ItemsSourceProperty, value); }
34 | }
35 |
36 | public InternalPopupEffect InternalEffect
37 | {
38 | get { return _internalEffect; }
39 | }
40 | #endregion
41 |
42 | #region construction
43 | public PopupMenu()
44 | {
45 | _internalEffect = new InternalPopupEffect(this);
46 | }
47 | #endregion
48 |
49 | #region methods
50 | public void ShowPopup(View sender)
51 | {
52 | var effects = sender.Effects.Where(c => c is InternalPopupEffect).ToList();
53 |
54 | // Remove all old popups
55 | if (effects.Count > 0 && (effects[0] != InternalEffect))
56 | foreach (var effect in effects)
57 | sender.Effects.Remove(effect);
58 |
59 | // Add new popup
60 | sender.Effects.Add(InternalEffect);
61 |
62 | // Invoke
63 | OnPopupRequest?.Invoke(sender);
64 | }
65 |
66 | public void InvokeItemSelected(string item) => OnItemSelected?.Invoke(item);
67 | #endregion
68 |
69 | #region classes
70 | ///
71 | /// INTERNAL USE ONLY.
72 | /// This is used by the Popup Menu as routing effects can not normally be bound, this provides the routing effect whereas the PopupMenu provides the bindable.
73 | ///
74 | public sealed class InternalPopupEffect : RoutingEffect
75 | {
76 | public PopupMenu Parent;
77 | internal InternalPopupEffect(PopupMenu menu) : base("Xam.Plugin.PopupEffect")
78 | {
79 | Parent = menu;
80 | }
81 | }
82 | #endregion
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Xam.Plugin")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Xam.Plugin")]
14 | [assembly: AssemblyCopyright("Copyright © 2017")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin/Xam.Plugin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {8CED5218-382E-44F4-8699-D366D30FF168}
9 | Library
10 | Properties
11 | Xam.Plugin
12 | Xam.Plugin
13 | en-US
14 | 512
15 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | Profile259
17 | v4.5
18 |
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll
45 | True
46 |
47 |
48 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll
49 | True
50 |
51 |
52 | ..\..\SampleApp\packages\Xamarin.Forms.2.3.4.247\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll
53 | True
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
64 |
65 |
66 |
67 |
74 |
--------------------------------------------------------------------------------
/Xam.Plugin.PopupMenu/Xam.Plugin/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/package.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Xam.Plugin.PopupMenu
5 | 1.1.0
6 | A Simple Popup Menu for Xamarin Forms
7 | Ryan Dixon
8 | Ryan Dixon
9 | false
10 | Abstracts native components to provide a simple popup menu on each platform.
11 | Breaking Change: Allow ItemSource Binding.
12 | Plugins, Xamarin, Popup, Context, Forms
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------