├── CardView
├── CardView
│ ├── CardView.Forms.Plugin.Android
│ │ ├── Resources
│ │ │ ├── Resource.Designer.cs
│ │ │ └── AboutResources.txt
│ │ ├── MeasureSpecFactory.cs
│ │ ├── packages.config
│ │ ├── CardsViewRenderer.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── AndroidDeviceInfo.cs
│ │ ├── CardViewRenderer.cs
│ │ └── CardView.Forms.Plugin.Droid.csproj
│ ├── CardView.Forms.Plugin.iOSUnified
│ │ ├── packages.config
│ │ ├── Extensions.cs
│ │ ├── XCardView.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── NewCardView.cs
│ │ ├── iOSCardView.cs
│ │ ├── iOSDeviceInfo.cs
│ │ ├── KSCardView
│ │ │ └── KSCardView.Partial.cs
│ │ ├── CardView.Forms.Plugin.iOSUnified.csproj
│ │ └── CardViewImplementation.cs
│ ├── CardView.Forms.Plugin.WindowsPhone
│ │ ├── Toolkit.Content
│ │ │ ├── ApplicationBar.Add.png
│ │ │ ├── ApplicationBar.Check.png
│ │ │ ├── ApplicationBar.Cancel.png
│ │ │ ├── ApplicationBar.Delete.png
│ │ │ └── ApplicationBar.Select.png
│ │ ├── README_FIRST.txt
│ │ ├── packages.config
│ │ ├── CardViewImplementation.cs
│ │ └── Properties
│ │ │ └── AssemblyInfo.cs
│ └── CardView.Forms.Plugin.Abstractions
│ │ ├── packages.config
│ │ ├── DeviceInfo.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── CardsView.cs
│ │ ├── CardContentView.cs
│ │ └── CardView.Forms.Plugin.Abstractions.csproj
├── iOS
│ ├── ITunesArtwork
│ ├── ITunesArtwork@2x
│ ├── Resources
│ │ ├── Default.png
│ │ ├── Icon-76.png
│ │ ├── Default@2x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small-40.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Icon-Small-40@2x.png
│ │ ├── Icon-Small-40@3x.png
│ │ ├── Default-Portrait@2x.png
│ │ └── LaunchScreen.storyboard
│ ├── Entitlements.plist
│ ├── packages.config
│ ├── Main.cs
│ ├── AppDelegate.cs
│ └── Info.plist
├── Droid
│ ├── Resources
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ └── AboutResources.txt
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── packages.config
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ └── CardView.Sample.Droid.csproj
├── CardView.Sample.iOS.Native
│ ├── Entitlements.plist
│ ├── packages.config
│ ├── Main.cs
│ ├── ViewController.designer.cs
│ ├── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.cs
│ ├── Resources
│ │ ├── Images.xcassets
│ │ │ └── AppIcons.appiconset
│ │ │ │ └── Contents.json
│ │ └── LaunchScreen.xib
│ ├── AppDelegate.cs
│ └── CardView.Sample.iOS.Native.csproj
└── CardView.Sample
│ ├── CardView.Sample.projitems
│ ├── CardView.Sample.shproj
│ └── CardView.Sample.cs
├── Popup Image View
├── iOS
│ ├── FodyWeavers.xml
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcons.appiconset
│ │ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── Main.cs
│ ├── packages.config
│ ├── AppDelegate.cs
│ ├── Info.plist
│ ├── LaunchScreen.storyboard
│ └── PopupImageViewRenderer.cs
├── Droid
│ ├── FodyWeavers.xml
│ ├── Resources
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ ├── layout
│ │ │ ├── Toolbar.axml
│ │ │ ├── Tabbar.axml
│ │ │ └── PreviewImage.axml
│ │ ├── values
│ │ │ └── styles.xml
│ │ └── AboutResources.txt
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── MainActivity.cs
│ ├── packages.config
│ ├── MainApplication.cs
│ └── PopupImageViewRenderer.cs
├── README.md
├── ImageTest
│ ├── PopupImageView.cs
│ ├── ImageTakerPage.xaml.cs
│ ├── ImageTest.cs
│ ├── NotNullConverter.cs
│ ├── ImageTest.shproj
│ ├── ObservableObject.cs
│ ├── ImageTest.projitems
│ ├── ImageTakerPage.xaml
│ └── ImageTakerPageModel.cs
└── ImageTest.sln
├── ExtendedMaps
├── Sample
│ ├── Droid
│ │ ├── Resources
│ │ │ ├── drawable
│ │ │ │ └── icon.png
│ │ │ ├── drawable-hdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── icon.png
│ │ │ └── AboutResources.txt
│ │ ├── packages.config
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── AndroidManifest.xml
│ │ └── ExtendedMaps.Sample.Droid.csproj
│ └── ExtendedMapsSample
│ │ ├── CustomPin.cs
│ │ ├── ExtendedMapsSample.cs
│ │ ├── ExtendedMapsSample.projitems
│ │ ├── ExtendedMapsSample.shproj
│ │ ├── DetailPage.cs
│ │ └── MyPage.cs
├── Library
│ ├── ExtendedMap.Droid
│ │ ├── Resources
│ │ │ ├── values
│ │ │ │ └── Strings.xml
│ │ │ ├── Resource.designer.cs
│ │ │ └── AboutResources.txt
│ │ ├── Maps.cs
│ │ ├── packages.config
│ │ └── ExtendedMaps.Droid.csproj
│ └── ExtendedMaps
│ │ ├── Models
│ │ └── IMapModel.cs
│ │ ├── packages.config
│ │ ├── Controls
│ │ ├── LiteMap.cs
│ │ ├── ExtendedPin.cs
│ │ └── ExtendedMap.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── ExtendedMaps.csproj
│ │ └── GeoHelper.cs
├── README.md
└── ExtendedMaps.sln
├── .gitignore
├── README.md
└── LICENSE.txt
/CardView/CardView/CardView.Forms.Plugin.Android/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CardView/iOS/ITunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/ITunesArtwork
--------------------------------------------------------------------------------
/Popup Image View/iOS/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CardView/iOS/ITunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/ITunesArtwork@2x
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Default.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/Popup Image View/Droid/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/CardView/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/CardView/iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/CardView/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/CardView/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/CardView/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/Popup Image View/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/ExtendedMaps/Sample/Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/Popup Image View/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/Popup Image View/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/ExtendedMaps/Sample/Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/Popup Image View/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/ExtendedMaps/Sample/Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/ExtendedMaps/Sample/Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ExtendedMaps.Droid
4 |
5 |
--------------------------------------------------------------------------------
/ExtendedMaps/README.md:
--------------------------------------------------------------------------------
1 | ExtendedMaps
2 | ===============
3 |
4 | A custom control that exposes the ability to create a bindable map as well as create maps in "lite mode".
5 |
6 | Currently only supported on Android.
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Add.png
--------------------------------------------------------------------------------
/Popup Image View/README.md:
--------------------------------------------------------------------------------
1 | Popup Image View
2 | ===============
3 | This is an example of how to do a full image popup/preview with a Xamarin.Forms Image.
4 |
5 | It is currently not written in plugin format, I have plans to do so later.
6 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Check.png
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Cancel.png
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Delete.png
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MysterDru/xamarin-plugins/HEAD/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Toolkit.Content/ApplicationBar.Select.png
--------------------------------------------------------------------------------
/CardView/iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/README_FIRST.txt:
--------------------------------------------------------------------------------
1 | For the Windows Phone toolkit make sure that you have
2 | marked the icons in the "Toolkit.Content" folder as content. That way they
3 | can be used as the icons for the ApplicationBar control.
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CardView/iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/Models/IMapModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Maps;
3 |
4 | namespace ExtendedMaps
5 | {
6 | public interface IMapModel
7 | {
8 | string Name { get; set; }
9 | string Details { get; set; }
10 | Position Location { get; set; }
11 | string ImageUrl { get; set; }
12 |
13 | Pin AsPin();
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/CardView/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/Maps.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.OS;
3 | using Android.Content;
4 | using Android.App;
5 |
6 | namespace ExtendedMaps
7 | {
8 | public class Maps
9 | {
10 | public static void Init(Activity context, Bundle bundle)
11 | {
12 | Xamarin.FormsMaps.Init (context, bundle);
13 |
14 | Droid.LiteMapRenderer.Bundle = bundle;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace ImageTest.iOS
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, "AppDelegate");
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/CustomPin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using ExtendedMaps;
4 | using System.Collections.Generic;
5 |
6 | namespace ExtendedMapsSample
7 | {
8 | public class CustomPin : ExtendedPin
9 | {
10 | public IEnumerable Enumerable
11 | {
12 | get {
13 | return new List {
14 | this
15 | }.AsEnumerable ();
16 | }
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/PopupImageView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace ImageTest
5 | {
6 | public class PopupImageView : Image
7 | {
8 | internal event EventHandler PopupRequested;
9 | // empty, all extra stuff is done in native renderers
10 |
11 | public void Show()
12 | {
13 | if (this.PopupRequested != null)
14 | {
15 | this.PopupRequested.Invoke(this, new EventArgs());
16 | }
17 | }
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace CardView.Sample.iOS.Native
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, "AppDelegate");
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/Controls/LiteMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Maps;
3 |
4 | namespace ExtendedMaps
5 | {
6 | public class LiteMap : ExtendedMap
7 | {
8 | internal event EventHandler MoveToRegionRequested = delegate {};
9 |
10 | public LiteMap(MapSpan region) : base(region)
11 | {
12 | // LastMoveToRegion = region;
13 | }
14 |
15 | public new void MoveToRegion(MapSpan mapSpan)
16 | {
17 | this.MoveToRegionRequested (this, mapSpan);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/CardView/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTakerPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Xamarin.Forms;
5 |
6 | namespace ImageTest
7 | {
8 | public partial class ImageTakerPage : ContentPage
9 | {
10 | public ImageTakerPage()
11 | {
12 | this.BindingContext = new ImageTakerPageModel();
13 |
14 | this.InitializeComponent();
15 | }
16 |
17 | private void HandleImagePreviewTapped(object sender, EventArgs args)
18 | {
19 | this.imagePreview.Show();
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/MeasureSpecFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Views;
3 |
4 | namespace CardView.Forms.Plugin.Droid
5 | {
6 | internal static class MeasureSpecFactory
7 | {
8 | public static int MakeMeasureSpec(int size, MeasureSpecMode mode)
9 | {
10 | return (int) (size + mode);
11 | }
12 |
13 | public static int GetSize(int measureSpec)
14 | {
15 | return measureSpec & 1073741823;
16 | }
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // This file has been generated automatically by MonoDevelop to store outlets and
3 | // actions made in the Xcode designer. If it is removed, they will be lost.
4 | // Manual changes to this file may not be handled correctly.
5 | //
6 | using Foundation;
7 |
8 | namespace CardView.Sample.iOS.Native
9 | {
10 | [Register("ViewController")]
11 | partial class ViewController
12 | {
13 | void ReleaseDesignerOutlets()
14 | {
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #Autosave files
2 | *~
3 |
4 | #build
5 | [Oo]bj/
6 | [Bb]in/
7 | packages/
8 | TestResults/
9 |
10 | # globs
11 | Makefile.in
12 | *.DS_Store
13 | *.sln.cache
14 | *.suo
15 | *.cache
16 | *.pidb
17 | *.userprefs
18 | *.usertasks
19 | config.log
20 | config.make
21 | config.status
22 | aclocal.m4
23 | install-sh
24 | autom4te.cache/
25 | *.user
26 | *.tar.gz
27 | tarballs/
28 | test-results/
29 | Thumbs.db
30 |
31 | #Mac bundle stuff
32 | *.dmg
33 | *.app
34 |
35 | #resharper
36 | *_Resharper.*
37 | *.Resharper
38 |
39 | #dotCover
40 | *.dotCover
41 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | namespace ImageTest
6 | {
7 | public class App : Application
8 | {
9 | public App()
10 | {
11 | MainPage = new NavigationPage(new ImageTakerPage());
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 |
31 |
--------------------------------------------------------------------------------
/CardView/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 CardView.Sample.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/ExtendedMapsSample.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 |
5 | namespace ExtendedMaps.Sample
6 | {
7 | public class App : Application
8 | {
9 | public App ()
10 | {
11 | MainPage = new NavigationPage(new MyPage ());
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 |
31 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/NotNullConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace ImageTest
5 | {
6 | public class NotNullConverter : IValueConverter
7 | {
8 | #region IValueConverter implementation
9 |
10 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
11 | {
12 | return value != null;
13 | }
14 |
15 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
16 | {
17 | throw new NotImplementedException();
18 | }
19 |
20 | #endregion
21 | }
22 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace CardView.Forms.Plugin.iOSUnified
5 | {
6 | internal static class Extensions
7 | {
8 | internal static void RemoveAllSubviews(this UIView super)
9 | {
10 | if (super == null)
11 | {
12 | return;
13 | }
14 |
15 | for (int i = 0; i < super.Subviews.Length; i++)
16 | {
17 | var subview = super.Subviews[i];
18 |
19 | subview.RemoveFromSuperview();
20 | }
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | xamarin-plugins
2 | ===============
3 |
4 | Cross platform Xamarin & Windows plugins & controls for PCLs
5 |
6 | # Current Plugins for Xamarin
7 |
8 | Each plugin has a README with more information on what they contain.
9 | * **[Xamarin.Forms ExtendedMaps](https://github.com/keannan5390/xamarin-plugins/tree/master/ExtendedMaps)**
10 | * **[Xamarin.Forms CardView](https://github.com/keannan5390/xamarin-plugins/tree/master/CardView)**
11 | * **[Xamarin.Forms Floating Action Button](https://github.com/keannan5390/Xamarin.Plugin.FAB)**
12 | * **[Xamarin.Forms Popup Image View](https://github.com/keannan5390/xamarin-plugins/tree/master/Popup%20Image%20View)**
13 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample/CardView.Sample.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {18A0C8C6-8C04-41ED-A2DD-D8E4043AE397}
7 |
8 |
9 | CardView.Sample
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CardView/Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/CardViewImplementation.cs:
--------------------------------------------------------------------------------
1 | using CardView.Forms.Plugin.Abstractions;
2 | using System;
3 | using Xamarin.Forms;
4 | using CardView.Forms.Plugin.WindowsPhone;
5 | using Xamarin.Forms.Platform.WinPhone;
6 |
7 | [assembly: ExportRenderer(typeof(CardView.Forms.Plugin.Abstractions.CardViewControl), typeof(CardViewRenderer))]
8 | namespace CardView.Forms.Plugin.WindowsPhone
9 | {
10 | ///
11 | /// CardView Renderer
12 | ///
13 | public class CardViewRenderer //: TRender (replace with renderer type
14 | {
15 | ///
16 | /// Used for registration with dependency service
17 | ///
18 | public static void Init() { }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CardView/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 CardView.Sample.iOS
9 | {
10 | [Register("AppDelegate")]
11 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
12 | {
13 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
14 | {
15 | var card = new CardView.Forms.Plugin.iOSUnified.iOSCardView();
16 | card.Dispose();
17 |
18 | global::Xamarin.Forms.Forms.Init();
19 |
20 |
21 |
22 | LoadApplication(new App());
23 |
24 | return base.FinishedLaunching(app, options);
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/DeviceInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace CardView.Forms.Plugin.Abstractions
5 | {
6 | internal abstract class DeviceInfo : BindableObject, IDisposable
7 | {
8 | private bool disposed;
9 |
10 | public abstract Size PixelScreenSize { get; }
11 |
12 | public abstract Size ScaledScreenSize { get; }
13 |
14 | public abstract double ScalingFactor { get; }
15 |
16 | public void Dispose()
17 | {
18 | this.Dispose(true);
19 | }
20 |
21 | protected virtual void Dispose(bool disposing)
22 | {
23 | if (this.disposed)
24 | return;
25 | this.disposed = true;
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/Controls/ExtendedPin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Maps;
3 |
4 | namespace ExtendedMaps
5 | {
6 | public class ExtendedPin : IMapModel
7 | {
8 | public ExtendedPin()
9 | {
10 | }
11 |
12 | public ExtendedPin(string name, string details, double latitude, double longitude)
13 | {
14 | Name = name;
15 | Details = details;
16 | Location = new Position(latitude, longitude);
17 | }
18 |
19 | public string Name { get; set; }
20 | public string Details { get; set; }
21 | public string ImageUrl { get; set; }
22 | public Position Location { get; set; }
23 |
24 | public Pin AsPin ()
25 | {
26 | return new Pin () {
27 | Label = this.Name,
28 | Position = this.Location,
29 | Address = this.Details,
30 | };
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/layout/PreviewImage.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
18 |
--------------------------------------------------------------------------------
/CardView/Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 |
11 | namespace CardView.Sample.Droid
12 | {
13 | [Activity(Label = "CardView.Sample.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
15 | {
16 | protected override void OnCreate(Bundle bundle)
17 | {
18 | base.OnCreate(bundle);
19 |
20 | global::Xamarin.Forms.Forms.Init(this, bundle);
21 |
22 | LoadApplication(new App());
23 | }
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/CardsViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using CardView.Forms.Plugin.Abstractions;
4 | using Xamarin.Forms.Platform.Android;
5 | using CardView.Forms.Plugin.Droid;
6 | using Xamarin.Forms;
7 | using Android.Support.V7.Widget;
8 | using Android.Views;
9 | using System.Collections.Generic;
10 | using Android.Widget;
11 | using System.ComponentModel;
12 | using Android.App;
13 | using Android.Content;
14 | using System.Collections.ObjectModel;
15 |
16 | //[assembly: ExportRenderer(typeof(CardsView), typeof(CardsViewRenderer))]
17 |
18 | namespace CardView.Forms.Plugin.Droid
19 | {
20 | public class CardsViewRenderer : ScrollViewRenderer
21 | {
22 | protected override void OnElementChanged(VisualElementChangedEventArgs e)
23 | {
24 | base.OnElementChanged(e);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 |
11 | namespace ExtendedMaps.Sample.Droid
12 | {
13 | [Activity (Label = "ExtendedMapsSample.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
14 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
15 | {
16 | protected override void OnCreate (Bundle bundle)
17 | {
18 | base.OnCreate (bundle);
19 |
20 | global::Xamarin.Forms.Forms.Init (this, bundle);
21 | ExtendedMaps.Maps.Init (this, bundle);
22 | // global::Xamarin.FormsMaps.Init (this, bundle);
23 |
24 | LoadApplication (new App ());
25 | }
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/ExtendedMapsSample.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {69ACA3E5-6F6C-4120-87E3-1EFCD5E2163D}
7 |
8 |
9 | ExtendedMapsSample
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTest.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {E4486A9A-8133-478E-82E5-56A46C6A4F33}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample/CardView.Sample.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {18A0C8C6-8C04-41ED-A2DD-D8E4043AE397}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/ExtendedMapsSample.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {69ACA3E5-6F6C-4120-87E3-1EFCD5E2163D}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 |
4 | namespace ImageTest.iOS
5 | {
6 | // The UIApplicationDelegate for the application. This class is responsible for launching the
7 | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
8 | [Register("AppDelegate")]
9 | public class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
10 | {
11 | // class-level declarations
12 |
13 | public override UIWindow Window
14 | {
15 | get;
16 | set;
17 | }
18 |
19 | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
20 | {
21 | // Override point for customization after application launch.
22 | // If not required for your application you can safely delete this method
23 |
24 | global::Xamarin.Forms.Forms.Init();
25 |
26 | base.LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(application, launchOptions);
29 | }
30 | }
31 | }
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ObservableObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Runtime.CompilerServices;
4 | using PropertyChanged;
5 |
6 | namespace ImageTest
7 | {
8 | [ImplementPropertyChanged]
9 | public class ObservableObject
10 | {
11 | ///
12 | /// Occurs when property changes.
13 | ///
14 | public event PropertyChangedEventHandler PropertyChanged;
15 |
16 | protected ObservableObject()
17 | {
18 | }
19 |
20 | ///
21 | /// Raise the property changed event for this class
22 | ///
23 | /// The name of the property to notify changed
24 | protected virtual void RaisePropertyChanged([CallerMemberName]string propertyName = null)
25 | {
26 | if (this.PropertyChanged != null)
27 | {
28 | this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
29 | }
30 | }
31 |
32 | public void ForceRaisePropertyChanged([CallerMemberName]string propertyName = null)
33 | {
34 | this.RaisePropertyChanged(propertyName);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/CardView/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle("CardView.Sample.Droid")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("")]
13 | [assembly: AssemblyCopyright("dfrisk")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle("ImageTest.Droid")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("")]
13 | [assembly: AssemblyCopyright("dfrisk")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Drew Frisk
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 |
23 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Content.PM;
6 | using Android.Runtime;
7 | using Android.Views;
8 | using Android.Widget;
9 | using Android.OS;
10 |
11 | [assembly: Xamarin.Forms.Xaml.XamlCompilation(Xamarin.Forms.Xaml.XamlCompilationOptions.Compile)]
12 |
13 | [assembly: UsesFeature("android.hardware.camera", Required = false)]
14 | [assembly: UsesFeature("android.hardware.camera.autofocus", Required = false)]
15 |
16 | namespace ImageTest.Droid
17 | {
18 | [Activity(Label = "ImageTest.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
19 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
20 | {
21 | protected override void OnCreate(Bundle bundle)
22 | {
23 | TabLayoutResource = Resource.Layout.Tabbar;
24 | ToolbarResource = Resource.Layout.Toolbar;
25 |
26 | base.OnCreate(bundle);
27 |
28 | global::Xamarin.Forms.Forms.Init(this, bundle);
29 |
30 | LoadApplication(new App());
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle ("ExtendedMapsSample.Droid")]
9 | [assembly: AssemblyDescription ("")]
10 | [assembly: AssemblyConfiguration ("")]
11 | [assembly: AssemblyCompany ("")]
12 | [assembly: AssemblyProduct ("")]
13 | [assembly: AssemblyCopyright ("Drew Frisk")]
14 | [assembly: AssemblyTrademark ("")]
15 | [assembly: AssemblyCulture ("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion ("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle ("ExtendedMaps")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("Drew Frisk")]
13 | [assembly: AssemblyTrademark ("")]
14 | [assembly: AssemblyCulture ("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion ("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 | [assembly:InternalsVisibleToAttribute("ExtendedMaps.Droid")]
29 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleName
6 | ImageTest.iOS
7 | CFBundleIdentifier
8 | com.rustechlabs.imagetest
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | MinimumOSVersion
16 | 9.2
17 | UIDeviceFamily
18 |
19 | 1
20 | 2
21 |
22 | UILaunchStoryboardName
23 | LaunchScreen
24 | UIRequiredDeviceCapabilities
25 |
26 | armv7
27 |
28 | UISupportedInterfaceOrientations
29 |
30 | UIInterfaceOrientationPortrait
31 | UIInterfaceOrientationLandscapeLeft
32 | UIInterfaceOrientationLandscapeRight
33 |
34 | XSAppIconAssets
35 | Assets.xcassets/AppIcons.appiconset
36 |
37 |
38 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("CardView.Forms.Plugin.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("CardView.Forms.Plugin.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 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/XCardView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace CardView.Forms.Plugin.iOSUnified
5 | {
6 | public class XCardView : UIView {
7 |
8 | private float raidus = 2;
9 |
10 | public float Radius
11 | {
12 | get
13 | {
14 | return this.raidus;
15 | }
16 | set
17 | {
18 | this.raidus = value;
19 |
20 | this.RefreshView();
21 | }
22 | }
23 |
24 | public XCardView()
25 | {
26 | }
27 |
28 | public override void LayoutSubviews()
29 | {
30 | base.LayoutSubviews();
31 |
32 | this.RefreshView();
33 | }
34 |
35 | private void RefreshView()
36 | {
37 | this.Layer.CornerRadius = this.raidus;
38 |
39 | var shadowPath = UIBezierPath.FromRoundedRect(this.Bounds, this.raidus);
40 |
41 | this.Layer.MasksToBounds = false;
42 | this.Layer.ShadowColor = UIColor.Black.CGColor;
43 | this.Layer.ShadowOffset = new CoreGraphics.CGSize(0, 3);
44 | this.Layer.ShadowOpacity = 0.5f;
45 | this.Layer.ShadowPath = shadowPath.CGPath;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTest.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {E4486A9A-8133-478E-82E5-56A46C6A4F33}
7 |
8 |
9 | ImageTest
10 |
11 |
12 |
13 |
14 |
15 | ImageTakerPage.xaml
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | MSBuild:UpdateDesignTimeXaml
24 |
25 |
26 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/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("CardView.Forms.Plugin.Abstractions")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("CardView.Forms.Plugin.Abstractions")]
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 |
32 |
33 | [assembly: InternalsVisibleTo("CardView.Forms.Plugin.Android")]
34 | [assembly: InternalsVisibleTo("CardView.Forms.Plugin.iOSUnified")]
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Main.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 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
35 |
41 |
42 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/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("CardView.Forms.Plugin.iOSUnified")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("CardView.Forms.Plugin.iOSUnified")]
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("a41090b7-b41d-469a-99d0-c35666b573d0")]
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 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | CardView.Sample.iOS.Native
7 | CFBundleIdentifier
8 | com.cardview.sample.native
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | MinimumOSVersion
16 | 8.3
17 | UIDeviceFamily
18 |
19 | 1
20 | 2
21 |
22 | UILaunchStoryboardName
23 | LaunchScreen
24 | UIMainStoryboardFile
25 | Main
26 | UIMainStoryboardFile~ipad
27 | Main
28 | UIRequiredDeviceCapabilities
29 |
30 | armv7
31 |
32 | UISupportedInterfaceOrientations
33 |
34 | UIInterfaceOrientationPortrait
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 | UISupportedInterfaceOrientations~ipad
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | XSAppIconAssets
45 | Resources/Images.xcassets/AppIcons.appiconset
46 |
47 |
48 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.WindowsPhone/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using System.Resources;
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("CardView.Forms.Plugin.WindowsPhone")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("CardView.Forms.Plugin.WindowsPhone")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("983b7eff-7e75-4a87-890a-744a0b4c5232")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Revision and Build Numbers
34 | // by using the '*' as shown below:
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
38 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/NewCardView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace CardView.Forms.Plugin.iOSUnified
5 | {
6 | public class NewCardCell : UIView
7 | {
8 | public UILabel TitleLabel {get; set;}
9 |
10 | public UILabel NameLabel {get; set;}
11 |
12 | public UILabel DescriptionLabel {get; set;}
13 |
14 | public UIButton CommentButton {get; set;}
15 |
16 | public UIButton LikeButton {get; set;}
17 |
18 | public UIView CardView {get; set;}
19 |
20 | public UIImageView ProfileImage {get; set;}
21 |
22 | void LayoutSubviews()
23 | {
24 | this.CardSetup();
25 | this.ImageSetup();
26 | }
27 |
28 | void CardSetup()
29 | {
30 | this.CardView.Alpha =1;
31 | this.CardView.Layer.MasksToBounds = false;
32 | this.CardView.Layer.CornerRadius = 1;
33 | this.CardView.Layer.ShadowOffset = new CoreGraphics.CGSize(- .2f, .2f);
34 | this.CardView.Layer.ShadowRadius = 1;
35 | this.CardView.Layer.ShadowOpacity = 0.2;
36 | UIBezierPath path = new UIBezierPath(this.CardView.Bounds);
37 | this.CardView.Layer.ShadowPath = path.CGPath;
38 | this.BackgroundColor = new UIColor( .9, .9, .9, 1);
39 | }
40 |
41 | void ImageSetup()
42 | {
43 | this.ProfileImage.Layer.CornerRadius = this.ProfileImage.Frame.Size.Width / 2;
44 | this.ProfileImage.ClipsToBounds = true;
45 | this.ProfileImage.ContentMode = UIViewContentMode.ScaleAspectFit;
46 | this.ProfileImage.BackgroundColor = UIColor.White;
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/iOSCardView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 | using CoreGraphics;
4 |
5 | namespace CardView.Forms.Plugin.iOSUnified
6 | {
7 | public class iOSCardView : UIView, IUIGestureRecognizerDelegate //, UIGestureRecognizerDelegate
8 | {
9 | public CGRect ZeroFrame { get; set; }
10 |
11 | public override CGRect Frame
12 | {
13 | get
14 | {
15 | return base.Frame;
16 | }
17 | set
18 | {
19 | base.Frame = value;
20 |
21 | this.DrawBorder(base.Frame, 0.0f);
22 | }
23 | }
24 |
25 | public iOSCardView()
26 | : base()
27 | {
28 | }
29 |
30 | public iOSCardView(CGRect frame)
31 | : base(frame)
32 | {
33 | this.DrawBorder(frame, 0.0f);
34 | }
35 |
36 | protected void DrawBorder(CGRect rect, nfloat radius)
37 | {
38 | UIBezierPath shadowPath = UIBezierPath.FromRect(this.Bounds);
39 | this.ZeroFrame = this.Frame;
40 | this.Layer.MasksToBounds = false;
41 | this.Layer.ShadowColor = UIColor.Black.CGColor;
42 | this.Layer.ShadowOffset = new CGSize(0.0f, 1.0f);
43 | this.Layer.ShadowOpacity = 0.5f;
44 | this.Layer.ShadowPath = shadowPath.CGPath;
45 | this.Layer.CornerRadius = radius;
46 | this.Layer.ShadowRadius = radius;
47 | // this.BackgroundColor = UIColor.White;
48 | }
49 |
50 | protected override void Dispose(bool disposing)
51 | {
52 | base.Dispose(disposing);
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/Resources/Resource.designer.cs:
--------------------------------------------------------------------------------
1 | #pragma warning disable 1591
2 | // ------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Mono Runtime Version: 4.0.30319.17020
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | // ------------------------------------------------------------------------------
11 |
12 | [assembly: Android.Runtime.ResourceDesignerAttribute("ExtendedMaps.Droid.Resource", IsApplication=false)]
13 |
14 | namespace ExtendedMaps.Droid
15 | {
16 |
17 |
18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
19 | public partial class Resource
20 | {
21 |
22 | static Resource()
23 | {
24 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
25 | }
26 |
27 | public partial class Attribute
28 | {
29 |
30 | static Attribute()
31 | {
32 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
33 | }
34 |
35 | private Attribute()
36 | {
37 | }
38 | }
39 |
40 | public partial class String
41 | {
42 |
43 | // aapt resource value: 0x7f020002
44 | public static int ApplicationName = 2130837506;
45 |
46 | // aapt resource value: 0x7f020001
47 | public static int Hello = 2130837505;
48 |
49 | // aapt resource value: 0x7f020000
50 | public static int library_name = 2130837504;
51 |
52 | static String()
53 | {
54 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
55 | }
56 |
57 | private String()
58 | {
59 | }
60 | }
61 | }
62 | }
63 | #pragma warning restore 1591
64 |
--------------------------------------------------------------------------------
/CardView/Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.OS;
5 | using Android.Runtime;
6 | using Plugin.CurrentActivity;
7 |
8 | namespace ImageTest.Droid
9 | {
10 | //You can specify additional application information in this attribute
11 | [Application]
12 | public class MainApplication : Application, Application.IActivityLifecycleCallbacks
13 | {
14 | public MainApplication(IntPtr handle, JniHandleOwnership transer)
15 | :base(handle, transer)
16 | {
17 | }
18 |
19 | public override void OnCreate()
20 | {
21 | base.OnCreate();
22 | RegisterActivityLifecycleCallbacks(this);
23 | //A great place to initialize Xamarin.Insights and Dependency Services!
24 | }
25 |
26 | public override void OnTerminate()
27 | {
28 | base.OnTerminate();
29 | UnregisterActivityLifecycleCallbacks(this);
30 | }
31 |
32 | public void OnActivityCreated(Activity activity, Bundle savedInstanceState)
33 | {
34 | CrossCurrentActivity.Current.Activity = activity;
35 | }
36 |
37 | public void OnActivityDestroyed(Activity activity)
38 | {
39 | }
40 |
41 | public void OnActivityPaused(Activity activity)
42 | {
43 | }
44 |
45 | public void OnActivityResumed(Activity activity)
46 | {
47 | CrossCurrentActivity.Current.Activity = activity;
48 | }
49 |
50 | public void OnActivitySaveInstanceState(Activity activity, Bundle outState)
51 | {
52 | }
53 |
54 | public void OnActivityStarted(Activity activity)
55 | {
56 | CrossCurrentActivity.Current.Activity = activity;
57 | }
58 |
59 | public void OnActivityStopped(Activity activity)
60 | {
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
16 |
19 |
20 |
21 |
22 |
24 |
25 |
28 |
29 |
32 |
35 |
36 |
40 |
46 |
50 |
56 |
57 |
58 |
63 |
64 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/CardsView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xamarin.Forms;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using System.Collections.ObjectModel;
7 |
8 | namespace CardView.Forms.Plugin.Abstractions
9 | {
10 | public class CardsView : ScrollView//StackLayout//Layout
11 | {
12 | internal event EventHandler LayoutChildrenRequested;
13 |
14 | internal new View Content
15 | {
16 | get { return base.Content; }
17 | set { base.Content = value; }
18 | }
19 |
20 | public new Color BackgroundColor
21 | {
22 | get { throw new NotSupportedException(); }
23 | set { throw new NotSupportedException(); }
24 | }
25 |
26 | public CardsView()
27 | {
28 | this.Content = new StackLayout
29 | {
30 | Padding = new Thickness(15),
31 | Spacing = 15
32 | };
33 | }
34 |
35 | public void AddCard(CardContentView card)
36 | {
37 | (this.Content as StackLayout).Children.Add(card);
38 | }
39 |
40 | public void RemoveCard(CardContentView card)
41 | {
42 | (this.Content as StackLayout).Children.Remove(card);
43 | }
44 |
45 | // protected override void OnSizeAllocated(double width, double height)
46 | // {
47 | // base.OnSizeAllocated(width, height);
48 | // }
49 | //
50 | // protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
51 | // {
52 | // return base.OnSizeRequest(widthConstraint, heightConstraint);
53 | // }
54 |
55 | // protected override void LayoutChildren(double x, double y, double width, double height)
56 | // {
57 | //// throw new NotImplementedException();
58 | // }
59 | }
60 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/ViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using UIKit;
4 |
5 | using CardView.Forms.Plugin.iOSUnified;
6 | using CoreGraphics;
7 |
8 | namespace CardView.Sample.iOS.Native
9 | {
10 | public partial class ViewController : UIViewController
11 | {
12 | private const float BUFFERX = 20f;
13 | private const float BUFFERY = 40f;
14 |
15 | public ViewController(IntPtr handle)
16 | : base(handle)
17 | {
18 | }
19 |
20 | public override void ViewDidLoad()
21 | {
22 | base.ViewDidLoad();
23 | // Perform any additional setup after loading the view, typically from a nib.
24 |
25 | this.View.BackgroundColor = new UIColor(0.95f,0.95f, 0.95f, 1);
26 |
27 |
28 | UILabel label1 = new UILabel(new CGRect(0, 0, 320, 44))
29 | {
30 | Text = "Label 1"
31 | };
32 |
33 | UILabel label2 = new UILabel(new CGRect(0, label1.Frame.Y + label1.Frame.Height, 320, 44))
34 | {
35 | Text = "Label 2"
36 | };
37 |
38 | UILabel label3 = new UILabel(new CGRect(0, label2.Frame.Y + label2.Frame.Height, 320, 100))
39 | {
40 | Text = "Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus.",
41 | LineBreakMode = UILineBreakMode.WordWrap
42 | };
43 |
44 | try {
45 | var cardView = new XCardView();
46 | cardView.AddSubview(label1);
47 | cardView.AddSubview(label2);
48 | cardView.AddSubview(label3);
49 |
50 | this.View.AddSubview(cardView);
51 | }
52 | catch(Exception e)
53 | {
54 | }
55 | }
56 |
57 | public override void DidReceiveMemoryWarning()
58 | {
59 | base.DidReceiveMemoryWarning();
60 | // Release any cached data, images, etc that aren't in use.
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/iOSDeviceInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using CardView.Forms.Plugin.Abstractions;
3 | using Foundation;
4 | using Xamarin.Forms;
5 | using UIKit;
6 |
7 | [assembly: Dependency(typeof(CardView.Forms.Plugin.iOSUnified.IOSDeviceInfo))]
8 |
9 | namespace CardView.Forms.Plugin.iOSUnified
10 | {
11 | internal class IOSDeviceInfo : DeviceInfo
12 | {
13 | private NSObject notification;
14 | private readonly Size pixelScreenSize;
15 | private readonly Size scaledScreenSize;
16 | private readonly double scalingFactor;
17 |
18 | public override Size PixelScreenSize
19 | {
20 | get
21 | {
22 | return this.pixelScreenSize;
23 | }
24 | }
25 |
26 | public override Size ScaledScreenSize
27 | {
28 | get
29 | {
30 | return this.scaledScreenSize;
31 | }
32 | }
33 |
34 | public override double ScalingFactor
35 | {
36 | get
37 | {
38 | return this.scalingFactor;
39 | }
40 | }
41 |
42 | public IOSDeviceInfo()
43 | {
44 | // this.notification = UIDevice.Notifications.ObserveOrientationDidChange((EventHandler) ((sender, args) => this.SetValueCore(DeviceInfo.CurrentOrientationPropertyKey, (object) Xamarin.Forms.Platform.iOS.Extensions.ToDeviceOrientation(UIDevice.CurrentDevice.Orientation), BindableObject.SetValueFlags.None)));
45 | this.scalingFactor = (double) UIScreen.MainScreen.Scale;
46 | this.scaledScreenSize = new Size((double) UIScreen.MainScreen.Bounds.Width, (double) UIScreen.MainScreen.Bounds.Height);
47 | this.pixelScreenSize = new Size(this.scaledScreenSize.Width * this.scalingFactor, this.scaledScreenSize.Height * this.scalingFactor);
48 | }
49 |
50 | protected override void Dispose(bool disposing)
51 | {
52 | // this.notification.Dispose();
53 | base.Dispose(disposing);
54 | }
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/CardView/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDisplayName
6 | CardView.Sample
7 | CFBundleIdentifier
8 | com.sample.cardview
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1.0
13 | LSRequiresIPhoneOS
14 |
15 | MinimumOSVersion
16 | 7.0
17 | UIDeviceFamily
18 |
19 | 1
20 | 2
21 |
22 | UIRequiredDeviceCapabilities
23 |
24 | armv7
25 |
26 | UISupportedInterfaceOrientations
27 |
28 | UIInterfaceOrientationPortrait
29 | UIInterfaceOrientationLandscapeLeft
30 | UIInterfaceOrientationLandscapeRight
31 |
32 | UISupportedInterfaceOrientations~ipad
33 |
34 | UIInterfaceOrientationPortrait
35 | UIInterfaceOrientationPortraitUpsideDown
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | CFBundleIconFiles
40 |
41 | Icon-60@2x
42 | Icon-60@3x
43 | Icon-76
44 | Icon-76@2x
45 | Default
46 | Default@2x
47 | Default-568h
48 | Default-568h@2x
49 | Default-Landscape
50 | Default-Landscape@2x
51 | Default-Portrait
52 | Default-Portrait@2x
53 | Icon-Small-40
54 | Icon-Small-40@2x
55 | Icon-Small-40@3x
56 | Icon-Small
57 | Icon-Small@2x
58 | Icon-Small@3x
59 |
60 | UILaunchStoryboardName
61 | LaunchScreen
62 |
63 |
64 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Resources/Images.xcassets/AppIcons.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "size": "29x29",
5 | "scale": "1x",
6 | "idiom": "iphone"
7 | },
8 | {
9 | "size": "29x29",
10 | "scale": "2x",
11 | "idiom": "iphone"
12 | },
13 | {
14 | "size": "29x29",
15 | "scale": "3x",
16 | "idiom": "iphone"
17 | },
18 | {
19 | "size": "40x40",
20 | "scale": "2x",
21 | "idiom": "iphone"
22 | },
23 | {
24 | "size": "40x40",
25 | "scale": "3x",
26 | "idiom": "iphone"
27 | },
28 | {
29 | "size": "57x57",
30 | "scale": "1x",
31 | "idiom": "iphone"
32 | },
33 | {
34 | "size": "57x57",
35 | "scale": "2x",
36 | "idiom": "iphone"
37 | },
38 | {
39 | "size": "60x60",
40 | "scale": "2x",
41 | "idiom": "iphone"
42 | },
43 | {
44 | "size": "60x60",
45 | "scale": "3x",
46 | "idiom": "iphone"
47 | },
48 | {
49 | "size": "29x29",
50 | "scale": "1x",
51 | "idiom": "ipad"
52 | },
53 | {
54 | "size": "29x29",
55 | "scale": "2x",
56 | "idiom": "ipad"
57 | },
58 | {
59 | "size": "40x40",
60 | "scale": "1x",
61 | "idiom": "ipad"
62 | },
63 | {
64 | "size": "40x40",
65 | "scale": "2x",
66 | "idiom": "ipad"
67 | },
68 | {
69 | "size": "50x50",
70 | "scale": "1x",
71 | "idiom": "ipad"
72 | },
73 | {
74 | "size": "50x50",
75 | "scale": "2x",
76 | "idiom": "ipad"
77 | },
78 | {
79 | "size": "72x72",
80 | "scale": "1x",
81 | "idiom": "ipad"
82 | },
83 | {
84 | "size": "72x72",
85 | "scale": "2x",
86 | "idiom": "ipad"
87 | },
88 | {
89 | "size": "76x76",
90 | "scale": "1x",
91 | "idiom": "ipad"
92 | },
93 | {
94 | "size": "76x76",
95 | "scale": "2x",
96 | "idiom": "ipad"
97 | },
98 | {
99 | "size": "120x120",
100 | "scale": "1x",
101 | "idiom": "car"
102 | }
103 | ],
104 | "info": {
105 | "version": 1,
106 | "author": "xcode"
107 | }
108 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/DetailPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using ExtendedMaps;
5 | using System.ComponentModel;
6 | using System.Collections.Generic;
7 | using System.Runtime.CompilerServices;
8 | using Xamarin.Forms.Maps;
9 |
10 | namespace ExtendedMapsSample
11 | {
12 | public class DetailPage : ContentPage
13 | {
14 | public DetailPage (CustomPin pin)
15 | {
16 | this.BindingContext = new DetailViewModel(pin);
17 |
18 | var map = new LiteMap (default(MapSpan)) {
19 | HeightRequest = 200
20 | };
21 |
22 | map.SetBinding (LiteMap.ItemsSourceProperty, b => b.Pins);
23 | map.SetBinding (LiteMap.VisibleRegionProperty, b => b.Span);
24 |
25 | this.SetBinding (Page.TitleProperty, b => b.Title);
26 |
27 | var detail = new Label ();
28 | detail.SetBinding (Label.TextProperty, b => b.Description);
29 |
30 | Content = new StackLayout {
31 | Children = {
32 | map,
33 | new ContentView {
34 | Padding = new Thickness (15),
35 | Content = detail
36 | }
37 | }
38 | };
39 | }
40 |
41 | public class DetailViewModel : INotifyPropertyChanged
42 | {
43 | public List Pins { get; private set; }
44 |
45 | public MapSpan Span { get; private set; }
46 |
47 | public string Title { get; private set; }
48 | public string Description { get; private set; }
49 |
50 | #region INotifyPropertyChanged implementation
51 | public event PropertyChangedEventHandler PropertyChanged;
52 | #endregion
53 |
54 | public DetailViewModel(CustomPin pin)
55 | {
56 | this.Pins = new List() { pin };
57 | this.Span = MapSpan.FromCenterAndRadius(
58 | pin.Location,
59 | Distance.FromMeters(1000)
60 | );
61 |
62 | this.Title = pin.Name;
63 | this.Description = pin.Details;
64 |
65 | this.RaisePropertyChanged("Description");
66 | this.RaisePropertyChanged("Title");
67 | this.RaisePropertyChanged("Span");
68 | this.RaisePropertyChanged("Pins");
69 | }
70 |
71 | private void RaisePropertyChanged([CallerMemberName] string properName = null)
72 | {
73 | if (this.PropertyChanged != null) {
74 | this.PropertyChanged (this, new PropertyChangedEventArgs (properName));
75 | }
76 | }
77 | }
78 | }
79 | }
80 |
81 |
82 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTakerPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
16 |
17 |
19 |
21 |
23 |
25 |
26 |
31 |
38 |
45 |
48 |
53 |
58 |
64 |
65 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/Controls/ExtendedMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Maps;
5 | using System.Collections.ObjectModel;
6 | using System.Windows.Input;
7 | using System.Collections.Generic;
8 | using System.Collections;
9 |
10 | namespace ExtendedMaps
11 | {
12 | public class ExtendedMap : Map
13 | {
14 | public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create (x => x.ItemsSource, null, propertyChanged: OnItemsSourceChanged);
15 |
16 | public static readonly BindableProperty SelectedPinProperty = BindableProperty.Create (x => x.SelectedPin, null);
17 |
18 | public static readonly BindableProperty VisibleRegionProperty = BindableProperty.Create (x => x.VisibleRegion, default(MapSpan));
19 |
20 | public static readonly BindableProperty ShowDetailCommandProperty = BindableProperty.Create( x => x.ShowDetailCommand, null);
21 |
22 | public ExtendedMap(MapSpan region) : base(region)
23 | {
24 | }
25 |
26 | public ExtendedPin SelectedPin
27 | {
28 | get{ return (ExtendedPin)base.GetValue (SelectedPinProperty); }
29 | set{ base.SetValue (SelectedPinProperty, value); }
30 | }
31 |
32 | public ICommand ShowDetailCommand
33 | {
34 | get{ return (ICommand)base.GetValue (ShowDetailCommandProperty); }
35 | set{ base.SetValue (ShowDetailCommandProperty, value); }
36 | }
37 |
38 | // public MapSpan LastMoveToRegion { get; private set; }
39 |
40 | public new MapSpan VisibleRegion
41 | {
42 | get{ return (MapSpan)base.GetValue (VisibleRegionProperty); }
43 | set{ base.SetValue (VisibleRegionProperty, value); }
44 | }
45 |
46 | public IEnumerable ItemsSource
47 | {
48 | get{ return (IEnumerable)base.GetValue (ItemsSourceProperty); }
49 | set{ base.SetValue (ItemsSourceProperty, value); }
50 | }
51 |
52 | private static void OnItemsSourceChanged(BindableObject bindable, IEnumerable oldvalue, IEnumerable newvalue)
53 | {
54 | var picker = bindable as ExtendedMap;
55 | picker.Pins.Clear ();
56 |
57 | if (newvalue != null)
58 | {
59 | var newList = newvalue.Cast ();
60 |
61 | if (newList == null) {
62 | throw new ArgumentException ("Your ItemsSource must be compatible with IEnumerable");
63 | }
64 |
65 | //now it works like "subscribe once" but you can improve
66 | foreach (var item in newList)
67 | {
68 | picker.Pins.Add (item.AsPin ());
69 | }
70 | }
71 | }
72 | }
73 | }
74 |
75 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/AndroidDeviceInfo.cs:
--------------------------------------------------------------------------------
1 | //using System;
2 | //using CardView.Forms.Plugin.Abstractions;
3 | //using Xamarin.Forms;
4 | //using Xamarin.Forms.Platform.Android;
5 | //using Android.Util;
6 | //
7 | //[assembly: Dependency(typeof(CardView.Forms.Plugin.Droid.AndroidDeviceInfo))]
8 | //
9 | //namespace CardView.Forms.Plugin.Droid
10 | //{
11 | // private class AndroidDeviceInfo : DeviceInfo
12 | // {
13 | // private FormsApplicationActivity formsActivity;
14 | // private readonly Size pixelScreenSize;
15 | // private readonly Size scaledScreenSize;
16 | // private readonly double scalingFactor;
17 | //
18 | // public override Size PixelScreenSize
19 | // {
20 | // get
21 | // {
22 | // return this.pixelScreenSize;
23 | // }
24 | // }
25 | //
26 | // public override Size ScaledScreenSize
27 | // {
28 | // get
29 | // {
30 | // return this.scaledScreenSize;
31 | // }
32 | // }
33 | //
34 | // public override double ScalingFactor
35 | // {
36 | // get
37 | // {
38 | // return this.scalingFactor;
39 | // }
40 | // }
41 | //
42 | // public AndroidDeviceInfo(FormsApplicationActivity formsActivity)
43 | // {
44 | // this.formsActivity = formsActivity;
45 | //
46 | // using (DisplayMetrics displayMetrics = formsActivity.Resources.DisplayMetrics)
47 | // {
48 | // this.scalingFactor = (double) displayMetrics.Density;
49 | // this.pixelScreenSize = new Size((double) displayMetrics.WidthPixels, (double) displayMetrics.HeightPixels);
50 | // this.scaledScreenSize = new Size(this.pixelScreenSize.Width / this.scalingFactor, this.pixelScreenSize.Width / this.scalingFactor);
51 | // }
52 | // }
53 | //
54 | // private void CheckOrientationChanged(Orientation orientation)
55 | // {
56 | //
57 | // this.previousOrientation = orientation;
58 | // }
59 | //
60 | // private void ConfigurationChanged(object sender, EventArgs e)
61 | // {
62 | // this.CheckOrientationChanged(this.formsActivity.Resources.Configuration.Orientation);
63 | // }
64 | //
65 | // protected override void Dispose(bool disposing)
66 | // {
67 | // this.formsActivity.ConfigurationChanged -= new EventHandler(this.ConfigurationChanged);
68 | // base.Dispose(disposing);
69 | // }
70 | // }
71 | //}
72 | //
73 |
--------------------------------------------------------------------------------
/CardView/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 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample/CardView.Sample.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Xamarin.Forms;
4 | using CardView.Forms.Plugin.Abstractions;
5 |
6 | namespace CardView.Sample
7 | {
8 | public class App : Application
9 | {
10 | public App()
11 | {
12 | this.MainPage = GetMainPage();
13 | }
14 |
15 | public static Page GetMainPage ()
16 | {
17 | var page = new ContentPage()
18 | {
19 | BackgroundColor = Color.Gray
20 | };
21 |
22 | var header = new BoxView
23 | {
24 | BackgroundColor = Color.Blue,
25 | Color = Color.Blue
26 | };
27 |
28 | var wrapper = new CardsView();
29 |
30 | for (int i = 0; i < 1; i++) {
31 |
32 | var panel = new StackLayout();
33 |
34 | panel.Children.Add(new Label
35 | {
36 | Text = "I am a card: " + i + "!!!",
37 | Font = Font.SystemFontOfSize(NamedSize.Large),
38 | VerticalOptions = LayoutOptions.Center,
39 | TextColor = Color.Black
40 | });
41 | panel.Children.Add(new Label
42 | {
43 | Text = "Row 2",
44 | Font = Font.SystemFontOfSize(NamedSize.Large),
45 | VerticalOptions = LayoutOptions.Center,
46 | TextColor = Color.Black
47 | });
48 |
49 | panel.Children.Add(new Button
50 | {Text = "Click Me",
51 | Command = new Command(() => {
52 | page.DisplayAlert("Click", "You clicked me!", "Ok");
53 | })
54 | });
55 |
56 | var card = new CardContentView {
57 | Padding = 15,
58 | CornderRadius = 5,
59 | Content = panel,
60 | BackgroundColor = Color.White,
61 | Command = new Command(() => {
62 | page.DisplayAlert("Alert", "I am a card: " + i + "!!!", "Ok");
63 | })
64 | };
65 |
66 | wrapper.AddCard(card);
67 | }
68 |
69 | // wrapper.Content = stack;
70 |
71 | var content = new AbsoluteLayout();
72 | content.Children.Add(header, new Rectangle(0, 0, 1, 0.25), AbsoluteLayoutFlags.SizeProportional);
73 | content.Children.Add(wrapper, new Rectangle(1, 0.25, 1, 1), AbsoluteLayoutFlags.All);
74 |
75 | page.Content = content;
76 |
77 | return new NavigationPage(page);
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 |
4 | namespace CardView.Sample.iOS.Native
5 | {
6 | // The UIApplicationDelegate for the application. This class is responsible for launching the
7 | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
8 | [Register("AppDelegate")]
9 | public class AppDelegate : UIApplicationDelegate
10 | {
11 | // class-level declarations
12 |
13 | public override UIWindow Window
14 | {
15 | get;
16 | set;
17 | }
18 |
19 | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
20 | {
21 | Xamarin.Forms.Forms.Init();
22 |
23 | // Override point for customization after application launch.
24 | // If not required for your application you can safely delete this method
25 |
26 | // Code to start the Xamarin Test Cloud Agent
27 | // #if ENABLE_TEST_CLOUD
28 | // Xamarin.Calabash.Start();
29 | // #endif
30 |
31 | return true;
32 | }
33 |
34 | public override void OnResignActivation(UIApplication application)
35 | {
36 | // Invoked when the application is about to move from active to inactive state.
37 | // This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
38 | // or when the user quits the application and it begins the transition to the background state.
39 | // Games should use this method to pause the game.
40 | }
41 |
42 | public override void DidEnterBackground(UIApplication application)
43 | {
44 | // Use this method to release shared resources, save user data, invalidate timers and store the application state.
45 | // If your application supports background exection this method is called instead of WillTerminate when the user quits.
46 | }
47 |
48 | public override void WillEnterForeground(UIApplication application)
49 | {
50 | // Called as part of the transiton from background to active state.
51 | // Here you can undo many of the changes made on entering the background.
52 | }
53 |
54 | public override void OnActivated(UIApplication application)
55 | {
56 | // Restart any tasks that were paused (or not yet started) while the application was inactive.
57 | // If the application was previously in the background, optionally refresh the user interface.
58 | }
59 |
60 | public override void WillTerminate(UIApplication application)
61 | {
62 | // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
63 | }
64 | }
65 | }
66 |
67 |
68 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/KSCardView/KSCardView.Partial.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 | using CoreGraphics;
3 |
4 | namespace CardView.Forms.Plugin.iOSUnified
5 | {
6 | public partial class Constants
7 | {
8 | public const int KHorizontalEdgeOffset = 65;
9 | public const int KVerticalEdgeOffset = 65;
10 | public const int KRubberBandFirstPass = 25;
11 | public const int KRubberBandSecondPass = 10;
12 | public const float KRubberBandDuration = 0.75f;
13 | public const float KCardLeavesDuration = 0.5f;
14 | public const float KRotationFactor = 0.25f;
15 | public const float KOverlayOpacityFactor = 0.5f;
16 | public const float KViewOpacityFactor = 0.15f;
17 | public const float KViewRotationOpacityFactor = 0.5f;
18 | public const int KStartRotation = 60;
19 | }
20 |
21 | public enum KSDirection {
22 | Up,
23 | Down,
24 | Left,
25 | Right
26 | }
27 |
28 | public enum KSViewTag {
29 | UpImage,
30 | DownImage,
31 | LeftImage,
32 | RightImage,
33 | }
34 | /*
35 | typedef NS_ENUM(NSUInteger, Direction)
36 | {
37 | DirectionUp,
38 | DirectionDown,
39 | DirectionLeft,
40 | DirectionRight,
41 |
42 | DirectionCount
43 | };
44 |
45 | typedef NS_ENUM(NSUInteger, ViewTags)
46 | {
47 | ViewTagUpImage = 1,
48 | ViewTagDownImage,
49 | ViewTagLeftImage,
50 | ViewTagRightImage,
51 | };
52 |
53 | */
54 |
55 | public class KSCardView : UIView
56 | {
57 | public KSCardViewDelegate TheDelegate {get; set;}
58 |
59 | public bool AllowLeft {get; set;}
60 |
61 | public bool AllowRight {get; set;}
62 |
63 | public bool AllowUp {get; set;}
64 |
65 | public bool AllowDown {get; set;}
66 |
67 | static void SetCardViewFrame(CGRect frame);
68 |
69 | static void SetOverlayLeftRightUpDown(UIView leftOverlay, UIView rightOverlay, UIView upOverlay, UIView downOverlay);
70 |
71 | void ShowFromLeft();
72 |
73 | void ShowFromRight();
74 |
75 | void ShowFromTop();
76 |
77 | void ShowFromBottom();
78 |
79 | void DemoUp();
80 |
81 | void DemoDown();
82 |
83 | void DemoLeft();
84 |
85 | void DemoRight();
86 |
87 | void DemoReset();
88 |
89 | void LeaveLeft();
90 |
91 | void LeaveRight();
92 |
93 | void LeaveTop();
94 |
95 | void LeaveBottom();
96 | }
97 |
98 | public interface KSCardViewDelegate
99 | {
100 | void CardDidLeaveTopEdge(KSCardView cardView);
101 |
102 | void CardDidLeaveBottomEdge(KSCardView cardView);
103 |
104 | void CardDidLeaveLeftEdge(KSCardView cardView);
105 |
106 | void CardDidLeaveRightEdge(KSCardView cardView);
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/Popup Image View/Droid/PopupImageViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Platform.Android;
4 | using Android.App;
5 | using Android.Views;
6 | using Android.Widget;
7 | using Android.Graphics;
8 | using Android.Util;
9 | using ImageTest;
10 | using Android.Graphics.Drawables;
11 |
12 | [assembly: ExportRenderer(typeof(PopupImageView), typeof(PopupImageViewRenderer))]
13 | namespace ImageTest
14 | {
15 | public class PopupImageViewRenderer : ImageRenderer, Android.Views.View.IOnClickListener
16 | {
17 | protected override void OnElementChanged(ElementChangedEventArgs e)
18 | {
19 | base.OnElementChanged(e);
20 |
21 | if (e.NewElement != null)
22 | {
23 | (e.NewElement as PopupImageView).PopupRequested += HandlePopupRequested;
24 | }
25 | else if (e.OldElement != null)
26 | {
27 | (e.NewElement as PopupImageView).PopupRequested -= HandlePopupRequested;
28 | }
29 | }
30 |
31 | ///
32 | /// Handles displaying the image in a full screen dialog.
33 | /// Will load a new instance of the image into the dialog's ImageView.
34 | ///
35 | private async void HandlePopupRequested(object sender, EventArgs e)
36 | {
37 | Dialog nagDialog = new Dialog(this.Context, global::Android.Resource.Style.ThemeTranslucentNoTitleBarFullScreen);
38 | nagDialog.RequestWindowFeature((int)WindowFeatures.NoTitle);
39 | nagDialog.SetCancelable(false);
40 | nagDialog.SetContentView(Droid.Resource.Layout.PreviewImage);
41 |
42 | var root = nagDialog.FindViewById(Droid.Resource.Id.iv_preview_container);
43 | root.SetBackgroundColor(Xamarin.Forms.Color.White.ToAndroid());
44 |
45 | Android.Widget.Button btnClose = nagDialog.FindViewById(Droid.Resource.Id.btnIvClose);
46 | ImageView ivPreview = nagDialog.FindViewById(Droid.Resource.Id.iv_preview_image);
47 |
48 | ivPreview.SetImageResource(global::Android.Resource.Color.Transparent);
49 |
50 | // this bitmap loading logic was taken & slightly modified from the Xamarin.Forms image renderer
51 | // https://github.com/xamarin/Xamarin.Forms/blob/2d9288eee6e6f197364a64308183725e7bd561f9/Xamarin.Forms.Platform.Android/Renderers/ImageRenderer.cs
52 | // https://github.com/xamarin/Xamarin.Forms/blob/2d9288eee6e6f197364a64308183725e7bd561f9/Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs
53 |
54 | BitmapDrawable drawable = this.Control.Drawable as BitmapDrawable;
55 |
56 | try
57 | {
58 | if (drawable != null)
59 | {
60 | Bitmap bitmap = drawable.Bitmap;
61 |
62 | ivPreview.SetImageBitmap(bitmap);
63 |
64 | if (bitmap != null)
65 | {
66 | bitmap.Dispose();
67 | }
68 |
69 | btnClose.Click += (s2, e2) => nagDialog.Dismiss();
70 |
71 | nagDialog.Show();
72 | }
73 | }
74 | catch (Exception ex)
75 | {
76 | Toast.MakeText(this.Context, "Unable to load your the image for preview.", ToastLength.Short);
77 | }
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/CardContentView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.Windows.Input;
4 |
5 | namespace CardView.Forms.Plugin.Abstractions
6 | {
7 | ///
8 | /// CardContentView Interface
9 | ///
10 | public class CardContentView : ContentView
11 | {
12 | public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create ( p => p.CornderRadius, 3.0F);
13 | public static readonly BindableProperty IsSwipeableProperty = BindableProperty.Create ( p => p.IsSwipeable, true);
14 |
15 | public static readonly BindableProperty CommandProperty = BindableProperty.Create ( p => p.Command, null, propertyChanged:CommandChanged);
16 | public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create ( p => p.CommandParameter, null, propertyChanged:CommandParameterChanged);
17 |
18 | private TapGestureRecognizer tapGesture;
19 |
20 |
21 | public float CornderRadius
22 | {
23 | get { return (float)GetValue (CornerRadiusProperty); }
24 | set { SetValue (CornerRadiusProperty, value); }
25 | }
26 |
27 | public bool IsSwipeable
28 | {
29 | get { return (bool)GetValue (IsSwipeableProperty); }
30 | set { SetValue (IsSwipeableProperty, value); }
31 | }
32 |
33 | public ICommand Command
34 | {
35 | get { return (ICommand)GetValue (CommandProperty); }
36 | set { SetValue (CommandProperty, value); }
37 | }
38 |
39 | public object CommandParameter
40 | {
41 | get { return (object)GetValue (CommandParameterProperty); }
42 | set { SetValue (CommandParameterProperty, value); }
43 | }
44 |
45 | protected override SizeRequest OnSizeRequest (double widthConstraint, double heightConstraint)
46 | {
47 | return base.OnSizeRequest(widthConstraint, heightConstraint);
48 | }
49 |
50 | private void InternalCommandChanged()
51 | {
52 | if (tapGesture != null)
53 | {
54 | this.GestureRecognizers.Remove(this.tapGesture);
55 | }
56 |
57 | tapGesture = null;
58 | tapGesture = new TapGestureRecognizer();
59 | tapGesture.Command = this.Command;
60 | tapGesture.CommandParameter = this.CommandParameter;
61 |
62 | this.GestureRecognizers.Add(tapGesture);
63 | }
64 |
65 | private static void CommandChanged(BindableObject bindable, ICommand oldValue, ICommand newValue)
66 | {
67 | (bindable as CardContentView).InternalCommandChanged();
68 | }
69 |
70 | private static void CommandParameterChanged(BindableObject bindable, object oldValue, object newValue)
71 | {
72 | (bindable as CardContentView).InternalCommandChanged();
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ImageTest", "ImageTest\ImageTest.shproj", "{E4486A9A-8133-478E-82E5-56A46C6A4F33}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageTest.Droid", "Droid\ImageTest.Droid.csproj", "{63B1866B-3B40-4FD3-9556-8BBA5F1306C4}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageTest.iOS", "iOS\ImageTest.iOS.csproj", "{ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
15 | Release|iPhone = Release|iPhone
16 | Release|iPhoneSimulator = Release|iPhoneSimulator
17 | Debug|iPhone = Debug|iPhone
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
25 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
26 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|iPhone.ActiveCfg = Release|Any CPU
27 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|iPhone.Build.0 = Release|Any CPU
28 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
29 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
30 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
31 | {63B1866B-3B40-4FD3-9556-8BBA5F1306C4}.Debug|iPhone.Build.0 = Debug|Any CPU
32 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
33 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
34 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|Any CPU.ActiveCfg = Release|iPhone
35 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|Any CPU.Build.0 = Release|iPhone
36 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
37 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
38 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|iPhone.ActiveCfg = Release|iPhone
39 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|iPhone.Build.0 = Release|iPhone
40 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
41 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
42 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|iPhone.ActiveCfg = Debug|iPhone
43 | {ED22503C-8E9D-4AA5-A67E-6FCF80ABB478}.Debug|iPhone.Build.0 = Debug|iPhone
44 | EndGlobalSection
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/Resources/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/Assets.xcassets/AppIcons.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "idiom": "iphone",
5 | "size": "29x29",
6 | "scale": "1x"
7 | },
8 | {
9 | "idiom": "iphone",
10 | "size": "29x29",
11 | "scale": "2x"
12 | },
13 | {
14 | "idiom": "iphone",
15 | "size": "29x29",
16 | "scale": "3x"
17 | },
18 | {
19 | "idiom": "iphone",
20 | "size": "40x40",
21 | "scale": "2x"
22 | },
23 | {
24 | "idiom": "iphone",
25 | "size": "40x40",
26 | "scale": "3x"
27 | },
28 | {
29 | "idiom": "iphone",
30 | "size": "57x57",
31 | "scale": "1x"
32 | },
33 | {
34 | "idiom": "iphone",
35 | "size": "57x57",
36 | "scale": "2x"
37 | },
38 | {
39 | "idiom": "iphone",
40 | "size": "60x60",
41 | "scale": "2x"
42 | },
43 | {
44 | "idiom": "iphone",
45 | "size": "60x60",
46 | "scale": "3x"
47 | },
48 | {
49 | "idiom": "ipad",
50 | "size": "29x29",
51 | "scale": "1x"
52 | },
53 | {
54 | "idiom": "ipad",
55 | "size": "29x29",
56 | "scale": "2x"
57 | },
58 | {
59 | "idiom": "ipad",
60 | "size": "40x40",
61 | "scale": "1x"
62 | },
63 | {
64 | "idiom": "ipad",
65 | "size": "40x40",
66 | "scale": "2x"
67 | },
68 | {
69 | "idiom": "ipad",
70 | "size": "50x50",
71 | "scale": "1x"
72 | },
73 | {
74 | "idiom": "ipad",
75 | "size": "50x50",
76 | "scale": "2x"
77 | },
78 | {
79 | "idiom": "ipad",
80 | "size": "72x72",
81 | "scale": "1x"
82 | },
83 | {
84 | "idiom": "ipad",
85 | "size": "72x72",
86 | "scale": "2x"
87 | },
88 | {
89 | "idiom": "ipad",
90 | "size": "76x76",
91 | "scale": "1x"
92 | },
93 | {
94 | "idiom": "ipad",
95 | "size": "76x76",
96 | "scale": "2x"
97 | },
98 | {
99 | "size": "24x24",
100 | "idiom": "watch",
101 | "scale": "2x",
102 | "role": "notificationCenter",
103 | "subtype": "38mm"
104 | },
105 | {
106 | "size": "27.5x27.5",
107 | "idiom": "watch",
108 | "scale": "2x",
109 | "role": "notificationCenter",
110 | "subtype": "42mm"
111 | },
112 | {
113 | "size": "29x29",
114 | "idiom": "watch",
115 | "role": "companionSettings",
116 | "scale": "2x"
117 | },
118 | {
119 | "size": "29x29",
120 | "idiom": "watch",
121 | "role": "companionSettings",
122 | "scale": "3x"
123 | },
124 | {
125 | "size": "40x40",
126 | "idiom": "watch",
127 | "scale": "2x",
128 | "role": "appLauncher",
129 | "subtype": "38mm"
130 | },
131 | {
132 | "size": "44x44",
133 | "idiom": "watch",
134 | "scale": "2x",
135 | "role": "longLook",
136 | "subtype": "42mm"
137 | },
138 | {
139 | "size": "86x86",
140 | "idiom": "watch",
141 | "scale": "2x",
142 | "role": "quickLook",
143 | "subtype": "38mm"
144 | },
145 | {
146 | "size": "98x98",
147 | "idiom": "watch",
148 | "scale": "2x",
149 | "role": "quickLook",
150 | "subtype": "42mm"
151 | }
152 | ],
153 | "info": {
154 | "version": 1,
155 | "author": "xcode"
156 | }
157 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/ExtendedMaps.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
7 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}
8 | Library
9 | ExtendedMaps
10 | ExtendedMaps
11 | v4.5
12 | Profile78
13 |
14 |
15 | true
16 | full
17 | false
18 | bin\Debug
19 | DEBUG;
20 | prompt
21 | 4
22 | false
23 |
24 |
25 | full
26 | true
27 | bin\Release
28 | prompt
29 | 4
30 | false
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
46 |
47 |
48 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
49 |
50 |
51 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll
52 |
53 |
54 | ..\..\packages\Xamarin.Forms.Maps.1.4.2.6359\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Maps.dll
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Popup Image View/ImageTest/ImageTakerPageModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using System.Windows.Input;
4 | using PropertyChanged;
5 | using Xamarin.Forms;
6 | using Plugin.Media.Abstractions;
7 |
8 | namespace ImageTest
9 | {
10 | [ImplementPropertyChanged]
11 | public class ImageTakerPageModel
12 | {
13 | private enum PictureMode
14 | {
15 | Camera,
16 | Gallery
17 | }
18 |
19 | private ICommand selectFromGalleryCommand;
20 | private ICommand takePhotoCommand;
21 | private ICommand clearCurrentImageCommand;
22 |
23 | private MediaFile imageFile;
24 |
25 | private IMedia mediaService;
26 |
27 | public bool CanSelectPhoto { get { return this.mediaService.IsPickPhotoSupported && this.imageFile == null; } }
28 |
29 | public bool CanTakePhoto { get { return this.mediaService.IsTakePhotoSupported && this.imageFile == null; } }
30 |
31 | public ICommand PickPhotoCommand
32 | {
33 | get { return this.selectFromGalleryCommand ?? (this.selectFromGalleryCommand = new Command(this.HandlePickPhotoCommand)); }
34 | }
35 |
36 | public ICommand TakePhotoCommand
37 | {
38 | get { return this.takePhotoCommand ?? (this.takePhotoCommand = new Command(this.HandleTakePhotoCommand)); }
39 | }
40 |
41 | public ICommand ClearCurrentImageCommand
42 | {
43 | get { return this.clearCurrentImageCommand ?? (this.clearCurrentImageCommand = new Command(this.HandleClearCurrentImageCommand)); }
44 | }
45 |
46 | public MediaFile ImageFile
47 | {
48 | get { return this.imageFile; }
49 | set
50 | {
51 | if (this.imageFile != null)
52 | {
53 | this.imageFile.Dispose();
54 | }
55 |
56 | if (this.ImageSource != null)
57 | {
58 | this.ImageSource = null;
59 | }
60 |
61 | this.imageFile = value;
62 |
63 | if (value != null)
64 | {
65 | this.ImageSource = Xamarin.Forms.ImageSource.FromStream(() =>
66 | {
67 | var stream = this.imageFile.GetStream();
68 | this.imageFile.Dispose();
69 | return stream;
70 | });
71 | }
72 | }
73 | }
74 |
75 | public ImageSource ImageSource
76 | {
77 | get; private set;
78 | }
79 |
80 | public ImageTakerPageModel()
81 | {
82 | this.mediaService = Plugin.Media.CrossMedia.Current;
83 | }
84 |
85 | private void HandleClearCurrentImageCommand(object obj)
86 | {
87 | this.ImageFile = null;
88 | }
89 |
90 | private async void HandlePickPhotoCommand()
91 | {
92 | await this.HandleSelectPhoto(PictureMode.Gallery);
93 | }
94 |
95 | private async void HandleTakePhotoCommand()
96 | {
97 | await this.HandleSelectPhoto(PictureMode.Camera);
98 | }
99 |
100 | private async Task HandleSelectPhoto(PictureMode mode)
101 | {
102 | bool notFound = false;
103 |
104 | MediaFile image = null;
105 |
106 | try
107 | {
108 | if (mode == PictureMode.Camera)
109 | {
110 | image = await this.GetImageFromCamera();
111 | }
112 | else if (mode == PictureMode.Gallery)
113 | {
114 | image = await this.GetImageFromGallery();
115 | }
116 | }
117 | catch
118 | {
119 | notFound = true;
120 | }
121 |
122 | if (notFound)
123 | {
124 | throw new Exception("Image Not Found");
125 | }
126 |
127 | this.ImageFile = image;
128 | }
129 |
130 | private async Task GetImageFromCamera()
131 | {
132 | try
133 | {
134 | string fileName = string.Format("{0}.jpg", DateTime.Now.Ticks);
135 |
136 | var media = await this.mediaService.TakePhotoAsync(new StoreCameraMediaOptions
137 | {
138 | DefaultCamera = CameraDevice.Rear,
139 | Name = fileName,
140 | Directory = "Docs"
141 | });
142 |
143 | return media;
144 | }
145 | catch
146 | {
147 | // do nothing
148 | }
149 |
150 | return null;
151 | }
152 |
153 | private async Task GetImageFromGallery()
154 | {
155 | try
156 | {
157 | var media = await this.mediaService.PickPhotoAsync();
158 |
159 | return media;
160 | }
161 | catch
162 | {
163 | // do nothing
164 | }
165 |
166 | return null;
167 | }
168 | }
169 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMaps/GeoHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using Xamarin.Forms.Maps;
5 |
6 | // http://blog.falafel.com/finding-closest-location-by-latitude-and-longitude/
7 |
8 | namespace ExtendedMaps
9 | {
10 | public static class GeoHelper
11 | {
12 | // Convert from Degrees to Radians
13 | private static double ToRad (this double num)
14 | {
15 | return num * Math.PI / 180;
16 | }
17 |
18 | // Convert from Radians to Degrees
19 | private static double ToDeg (this double num)
20 | {
21 | return num * 180 / Math.PI;
22 | }
23 |
24 | public static Position GetCentralPosition(IEnumerable geoCoordinates)
25 | {
26 | if (geoCoordinates.Count() == 1) {
27 | return geoCoordinates.Single ();
28 | }
29 |
30 | double x = 0;
31 | double y = 0;
32 | double z = 0;
33 |
34 | foreach (var geoCoordinate in geoCoordinates) {
35 | var latitude = geoCoordinate.Latitude * Math.PI / 180;
36 | var longitude = geoCoordinate.Longitude * Math.PI / 180;
37 |
38 | x += Math.Cos (latitude) * Math.Cos (longitude);
39 | y += Math.Cos (latitude) * Math.Sin (longitude);
40 | z += Math.Sin (latitude);
41 | }
42 |
43 | var total = geoCoordinates.Count();
44 |
45 | x = x / total;
46 | y = y / total;
47 | z = z / total;
48 |
49 | var centralLongitude = Math.Atan2 (y, x);
50 | var centralSquareRoot = Math.Sqrt (x * x + y * y);
51 | var centralLatitude = Math.Atan2 (z, centralSquareRoot);
52 |
53 | return new Position (
54 | centralLatitude * 180 / Math.PI,
55 | centralLongitude * 180 / Math.PI
56 | );
57 | }
58 |
59 | public static double GetDistance (double lat1, double lon1, double lat2, double lon2, bool inMeters = false)
60 | {
61 | const int r = 6371; // radius of earth in km
62 |
63 | // Convert to Radians
64 | lat1 = lat1.ToRad ();
65 | lon1 = lon1.ToRad ();
66 | lat2 = lat2.ToRad ();
67 | lon2 = lon2.ToRad ();
68 |
69 | // Spherical Law of Cosines
70 | var resultCos =
71 | Math.Acos (
72 | Math.Sin (lat1) * Math.Sin (lat2) +
73 | Math.Cos (lat1) * Math.Cos (lat2) * Math.Cos (lon2 - lon1)
74 | ) * r;
75 |
76 | if (inMeters) {
77 | return resultCos * 1000;
78 | } else {
79 | return resultCos;
80 | }
81 | }
82 |
83 | public static Position GetClosestPoint (double originLat, double originLong, IEnumerable points)
84 | {
85 | // Build a List that contains the calculated distance for each point
86 | var list = points.Select (p => new Distance (p, GetDistance (originLat, originLong, p.Latitude, p.Longitude))).ToList ();
87 |
88 | if (!list.Any ())
89 | {
90 | return default(Position);
91 | }
92 |
93 | // Sort the List using the custom IComparable implementation to sort by Distance.Km
94 | list.Sort ();
95 |
96 | return list.First ().Position;
97 | }
98 |
99 | public static double GetRadius (Position center, IEnumerable points, bool meters = false)
100 | {
101 | var distances = new List ();
102 | // var distances = points.Select (p => GetDistance (center.Latitude, center.Longitude, p.Latitude, p.Longitude));
103 | foreach (Position point in points) {
104 | var distance = GetDistance (center.Latitude, center.Longitude, point.Latitude, point.Longitude);
105 | distances.Add (distance);
106 | }
107 |
108 | var max = distances.Max ();
109 |
110 | if (meters) {
111 | return max * 1000;
112 | } else {
113 | return max;
114 | }
115 | }
116 |
117 | private class Distance : IComparable
118 | {
119 | internal int Id { get; set; }
120 |
121 | internal double Km { get; set; }
122 |
123 | internal double Latitude { get; set; }
124 |
125 | internal double Longitude { get; set; }
126 |
127 | internal Position Position { get { return new Position (this.Latitude, this.Longitude); } }
128 |
129 | public Distance (Position iLocation, double km)
130 | {
131 | // Id = iLocation.Id;
132 | Latitude = iLocation.Latitude;
133 | Longitude = iLocation.Longitude;
134 | Km = km;
135 | }
136 |
137 | // Compare Km for sorting
138 | public int CompareTo (object obj)
139 | {
140 | var d = (Distance)obj;
141 | return Km.CompareTo (d.Km);
142 | }
143 | }
144 | }
145 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Abstractions/CardView.Forms.Plugin.Abstractions.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {14C534B6-1984-41A9-A384-D3A5508588E3}
9 | Library
10 | Properties
11 | CardView.Forms.Plugin.Abstractions
12 | CardView.Forms.Plugin.Abstractions
13 | en-US
14 | 512
15 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | Profile78
17 | v4.5
18 | 2b6db143
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 | bin\Release\CardView.Forms.Plugin.Abstractions.XML
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
47 |
48 |
49 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
60 |
61 |
62 |
63 |
70 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/CardViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Platform.Android;
4 | using Android.Views;
5 | using CardView.Forms.Plugin.Abstractions;
6 |
7 | [assembly:ExportRendererAttribute (typeof(CardContentView), typeof(CardView.Forms.Plugin.Droid.CardViewRenderer))]
8 |
9 | namespace CardView.Forms.Plugin.Droid
10 | {
11 | public class CardViewRenderer : Android.Support.V7.Widget.CardView, IVisualElementRenderer
12 | {
13 | public CardViewRenderer () : base (Xamarin.Forms.Forms.Context)
14 | {
15 |
16 | }
17 |
18 | public event EventHandler ElementChanged;
19 |
20 | bool init;
21 |
22 | public void SetElement (VisualElement element)
23 | {
24 | var oldElement = this.Element;
25 |
26 | if (oldElement != null)
27 | oldElement.PropertyChanged -= HandlePropertyChanged;
28 |
29 | this.Element = element;
30 | if (this.Element != null) {
31 | //UpdateContent ();
32 | this.Element.PropertyChanged += HandlePropertyChanged;
33 | }
34 |
35 | this.ViewGroup.RemoveAllViews ();
36 | //sizes to match the forms view
37 | //updates properties, handles visual element properties
38 | this.Tracker = new VisualElementTracker (this);
39 |
40 | this.Packager = new VisualElementPackager (this);
41 | this.Packager.Load ();
42 |
43 | this.UseCompatPadding = true;
44 |
45 | this.SetContentPadding ((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
46 |
47 | this.Radius = TheView.CornderRadius;
48 |
49 | this.SetCardBackgroundColor(TheView.BackgroundColor.ToAndroid ());
50 | if (this.ElementChanged != null)
51 | {
52 | this.ElementChanged(this, new VisualElementChangedEventArgs(oldElement, this.Element));
53 | }
54 | }
55 |
56 | public CardContentView TheView
57 | {
58 | get { return this.Element == null ? null : (CardContentView)Element; }
59 | }
60 |
61 | private void HandlePropertyChanged (object sender, System.ComponentModel.PropertyChangedEventArgs e)
62 | {
63 | if (e.PropertyName == "Content")
64 | {
65 | this.Tracker.UpdateLayout ();
66 | }
67 | else if (e.PropertyName == CardContentView.PaddingProperty.PropertyName)
68 | {
69 | this.SetContentPadding ((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
70 | }
71 | else if (e.PropertyName == CardContentView.CornerRadiusProperty.PropertyName)
72 | {
73 | this.Radius = this.TheView.CornderRadius;
74 | }
75 | else if (e.PropertyName == CardContentView.BackgroundColorProperty.PropertyName)
76 | {
77 | if (this.TheView.BackgroundColor != null)
78 | {
79 | this.SetCardBackgroundColor(this.TheView.BackgroundColor.ToAndroid());
80 | }
81 | }
82 | }
83 |
84 | public SizeRequest GetDesiredSize (int widthConstraint, int heightConstraint)
85 | {
86 | this.Measure (widthConstraint, heightConstraint);
87 |
88 | //Measure child here and determine size
89 | return new SizeRequest (new Size (this.MeasuredWidth, this.MeasuredHeight));
90 | }
91 |
92 | public void UpdateLayout ()
93 | {
94 | if (Tracker == null)
95 | {
96 | return;
97 | }
98 |
99 | Tracker.UpdateLayout ();
100 | }
101 |
102 | public VisualElementTracker Tracker
103 | {
104 | get;
105 | private set;
106 | }
107 |
108 | public VisualElementPackager Packager
109 | {
110 | get;
111 | private set;
112 | }
113 |
114 | public Android.Views.ViewGroup ViewGroup
115 | {
116 | get{ return this; }
117 | }
118 |
119 | public VisualElement Element
120 | {
121 | get;
122 | private set;
123 | }
124 | }
125 | }
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/CardView.Forms.Plugin.iOSUnified.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {38BB3E97-472B-49AF-BEB6-DB435FACE363}
7 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | CardView.Forms.Plugin.iOSUnified
10 | Resources
11 | CardView.Forms.Plugin.iOSUnified
12 | 8edfb480
13 |
14 |
15 | true
16 | full
17 | false
18 | bin\iPhone\Debug
19 | DEBUG
20 | prompt
21 | 4
22 | false
23 | true
24 | iPhone Developer
25 |
26 |
27 | none
28 | true
29 | bin\iPhone\Release
30 | prompt
31 | 4
32 | false
33 | iPhone Developer
34 | bin\iPhone\Release\CardView.Forms.Plugin.iOSUnified.XML
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | {14C534B6-1984-41A9-A384-D3A5508588E3}
48 | CardView.Forms.Plugin.Abstractions
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
57 |
58 |
59 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
60 |
61 |
62 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/ExtendedMaps/ExtendedMaps.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{CBBBE669-1979-49FC-AE75-1EAF6146076C}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedMaps", "Library\ExtendedMaps\ExtendedMaps.csproj", "{C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedMaps.Droid", "Library\ExtendedMap.Droid\ExtendedMaps.Droid.csproj", "{FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{500F54D0-1079-4918-A221-0A5E58ED3B17}"
11 | EndProject
12 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ExtendedMapsSample", "Sample\ExtendedMapsSample\ExtendedMapsSample.shproj", "{69ACA3E5-6F6C-4120-87E3-1EFCD5E2163D}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedMaps.Sample.Droid", "Sample\Droid\ExtendedMaps.Sample.Droid.csproj", "{69A0609B-287A-41BD-9C45-44BB8D736589}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Release|Any CPU = Release|Any CPU
20 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
21 | Release|iPhone = Release|iPhone
22 | Release|iPhoneSimulator = Release|iPhoneSimulator
23 | Debug|iPhone = Debug|iPhone
24 | EndGlobalSection
25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
26 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|iPhone.ActiveCfg = Debug|Any CPU
29 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|iPhone.Build.0 = Debug|Any CPU
30 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
31 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
32 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|iPhone.ActiveCfg = Release|Any CPU
35 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|iPhone.Build.0 = Release|Any CPU
36 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
37 | {69A0609B-287A-41BD-9C45-44BB8D736589}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
38 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|iPhone.ActiveCfg = Debug|Any CPU
41 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|iPhone.Build.0 = Debug|Any CPU
42 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
43 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
44 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|Any CPU.Build.0 = Release|Any CPU
46 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|iPhone.ActiveCfg = Release|Any CPU
47 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|iPhone.Build.0 = Release|Any CPU
48 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
49 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
50 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
53 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|iPhone.Build.0 = Debug|Any CPU
54 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
55 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
56 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|iPhone.ActiveCfg = Release|Any CPU
59 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|iPhone.Build.0 = Release|Any CPU
60 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
61 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
62 | EndGlobalSection
63 | GlobalSection(NestedProjects) = preSolution
64 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13} = {CBBBE669-1979-49FC-AE75-1EAF6146076C}
65 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF} = {CBBBE669-1979-49FC-AE75-1EAF6146076C}
66 | {69ACA3E5-6F6C-4120-87E3-1EFCD5E2163D} = {500F54D0-1079-4918-A221-0A5E58ED3B17}
67 | {69A0609B-287A-41BD-9C45-44BB8D736589} = {500F54D0-1079-4918-A221-0A5E58ED3B17}
68 | EndGlobalSection
69 | EndGlobal
70 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/ExtendedMapsSample/MyPage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | using Xamarin.Forms;
7 | using Xamarin.Forms.Maps;
8 | using System.ComponentModel;
9 | using System.Collections.ObjectModel;
10 | using System.Runtime.CompilerServices;
11 | using ExtendedMapsSample;
12 | using System.Windows.Input;
13 |
14 | namespace ExtendedMaps.Sample
15 | {
16 | public class MyPage : ContentPage
17 | {
18 | public MyPage ()
19 | {
20 | var vm = new ViewModel ();
21 | this.BindingContext = vm;
22 |
23 | var center = GeoHelper.GetCentralPosition (vm.Monkeys.Select (m => m.Location));
24 |
25 | var radius = GeoHelper.GetRadius (center, vm.Monkeys.Select (m => m.Location), true);
26 |
27 | var map = new ExtendedMap (
28 | MapSpan.FromCenterAndRadius (
29 | center,
30 | Distance.FromMeters (radius)
31 | )
32 | );
33 | // map.BindingContext = this.BindingContext;
34 | map.SetBinding (ExtendedMap.ItemsSourceProperty, m => m.Monkeys);
35 | map.SetBinding (ExtendedMap.SelectedPinProperty, m => m.Selected, BindingMode.TwoWay);
36 | map.SetBinding (ExtendedMap.VisibleRegionProperty, m => m.Span, BindingMode.TwoWay);
37 | map.SetBinding (ExtendedMap.ShowDetailCommandProperty, m => m.PinSelectedCommand);
38 |
39 | var relativeLayout = new RelativeLayout ();
40 |
41 | relativeLayout.Children.Add(
42 | map,
43 | widthConstraint: Constraint.RelativeToParent((parent) => { return parent.Width; }),
44 | heightConstraint: Constraint.RelativeToParent((parent) => { return parent.Height * 0.5; }));
45 |
46 | var listView = new ListView ();
47 | listView.RowHeight = 50;
48 | listView.ItemTemplate = new DataTemplate (typeof(TextCell));
49 | listView.ItemTemplate.SetBinding (TextCell.TextProperty, "Name");
50 | listView.SetBinding (ListView.ItemsSourceProperty, m => m.Monkeys);
51 | listView.ItemSelected += async (sender, e) => {
52 | vm.Selected = e.SelectedItem as CustomPin;
53 | };
54 |
55 | vm.PinSelected += (sender, e) => {
56 | this.Navigation.PushAsync(new DetailPage(e));
57 | };
58 |
59 | relativeLayout.Children.Add(
60 | listView,
61 | yConstraint: Constraint.RelativeToView(map, (parent, view) => { return view.Height + 50; }),
62 | heightConstraint: Constraint.RelativeToView(map, (parent, view) => { return parent.Height - view.Height - 50; }));
63 |
64 | this.Content = relativeLayout;
65 | }
66 |
67 | private class ViewModel : INotifyPropertyChanged
68 | {
69 | public event EventHandler PinSelected;
70 | public event PropertyChangedEventHandler PropertyChanged;
71 |
72 | private CustomPin selected;
73 |
74 | public ObservableCollection Monkeys { get; set; }
75 |
76 | public CustomPin Selected {
77 | get { return this.selected; }
78 | set {
79 | this.selected = value;
80 | this.RaisePropertyChanged ();
81 | }
82 | }
83 |
84 | public MapSpan Span { get; private set; }
85 |
86 | public ICommand PinSelectedCommand { get; private set; }
87 |
88 | public ViewModel()
89 | {
90 | this.Monkeys = new ObservableCollection();
91 |
92 | this.Monkeys.Add(new CustomPin {
93 | Name = "Baboon",
94 | Location = new Position(34.027897, 118.301869 ),
95 | Details = "Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae.",
96 | });
97 |
98 | this.Monkeys.Add(new CustomPin {
99 | Name = "Capuchin Monkey",
100 | Location = new Position(34.047797,-118.321869 ),
101 | Details = "The capuchin monkeys are New World monkeys of the subfamily Cebinae. Prior to 2011, the subfamily contained only a single genus, Cebus.",
102 | });
103 |
104 | this.Monkeys.Add(new CustomPin {
105 | Name = "Blue Monkey",
106 | Location = new Position(34.007897, -118.300069 ),
107 | Details = "The blue monkey or diademed monkey is a species of Old World monkey native to Central and East Africa, ranging from the upper Congo River basin east to the East African Rift and south to northern Angola and Zambia",
108 | });
109 |
110 |
111 | this.Monkeys.Add(new CustomPin {
112 | Name = "Squirrel Monkey",
113 | Location = new Position(34.107897, -118.292869),
114 | Details = "The squirrel monkeys are the New World monkeys of the genus Saimiri. They are the only genus in the subfamily Saimirinae. The name of the genus Saimiri is of Tupi origin, and was also used as an English name by early researchers.",
115 | });
116 |
117 | var center = GeoHelper.GetCentralPosition(this.Monkeys.Select(m => m.Location));
118 | var radiusInMeters = GeoHelper.GetRadius(center, this.Monkeys.Select(m => m.Location), true);
119 |
120 | this.Span = MapSpan.FromCenterAndRadius(center, Distance.FromMeters(radiusInMeters));
121 |
122 | this.PinSelectedCommand = new Command((pin) => { this.PinSelected(this, pin); });
123 | }
124 |
125 | private void RaisePropertyChanged([CallerMemberName] string properName = null)
126 | {
127 | if (this.PropertyChanged != null) {
128 | this.PropertyChanged (this, new PropertyChangedEventArgs (properName));
129 | }
130 | }
131 | }
132 | }
133 | }
--------------------------------------------------------------------------------
/ExtendedMaps/Library/ExtendedMap.Droid/ExtendedMaps.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
7 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}
8 | Library
9 | ExtendedMaps.Droid
10 | Assets
11 | Resources
12 | Resource
13 | Resources\Resource.designer.cs
14 | True
15 | ExtendedMaps.Droid
16 | v5.0
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\Debug
23 | DEBUG;
24 | prompt
25 | 4
26 | None
27 | false
28 |
29 |
30 | full
31 | true
32 | bin\Release
33 | prompt
34 | 4
35 | false
36 | false
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ..\..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll
45 |
46 |
47 | ..\..\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
48 |
49 |
50 | ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
51 |
52 |
53 | ..\..\packages\Xamarin.GooglePlayServices.22.0.0.0\lib\MonoAndroid41\GooglePlayServicesLib.dll
54 |
55 |
56 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
57 |
58 |
59 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\FormsViewGroup.dll
60 |
61 |
62 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Core.dll
63 |
64 |
65 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
66 |
67 |
68 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
69 |
70 |
71 | ..\..\packages\Xamarin.Forms.Maps.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Maps.Android.dll
72 |
73 |
74 | ..\..\packages\Xamarin.Forms.Maps.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Maps.dll
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}
98 | ExtendedMaps
99 |
100 |
101 |
--------------------------------------------------------------------------------
/CardView/CardView.Sample.iOS.Native/CardView.Sample.iOS.Native.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
7 | {1BF85C89-C86E-4191-926F-DE11EF614B9C}
8 | Exe
9 | CardView.Sample.iOS.Native
10 | Resources
11 |
12 |
13 | true
14 | full
15 | false
16 | bin\iPhoneSimulator\Debug
17 | DEBUG;ENABLE_TEST_CLOUD;
18 | prompt
19 | 4
20 | false
21 | i386
22 | None
23 | true
24 | true
25 | CardViewSample.iOSNative
26 |
27 |
28 | full
29 | true
30 | bin\iPhone\Release
31 | prompt
32 | 4
33 | Entitlements.plist
34 | ARMv7, ARM64
35 | false
36 | iPhone Developer
37 | CardView.Sample.iOS.Native
38 |
39 |
40 | full
41 | true
42 | bin\iPhoneSimulator\Release
43 | prompt
44 | 4
45 | i386
46 | false
47 | None
48 | CardViewSample.iOSNative
49 |
50 |
51 | true
52 | full
53 | false
54 | bin\iPhone\Debug
55 | DEBUG;ENABLE_TEST_CLOUD;
56 | prompt
57 | 4
58 | false
59 | ARMv7, ARM64
60 | Entitlements.plist
61 | true
62 | iPhone Developer
63 | true
64 | CardView.Sample.iOS.Native
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | ..\packages\Xamarin.TestCloud.Agent.0.13.0\lib\Xamarin.iOS10\Calabash.dll
73 |
74 |
75 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
76 |
77 |
78 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
79 |
80 |
81 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | ViewController.cs
102 |
103 |
104 |
105 |
106 |
107 |
108 | {38BB3E97-472B-49AF-BEB6-DB435FACE363}
109 | CardView.Forms.Plugin.iOSUnified
110 |
111 |
112 |
--------------------------------------------------------------------------------
/CardView/Droid/CardView.Sample.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
7 | {7E7CC710-DC27-456D-B927-10DC95C5E985}
8 | Library
9 | CardView.Sample.Droid
10 | Assets
11 | Resources
12 | Resource
13 | Resources\Resource.designer.cs
14 | True
15 | True
16 | CardView.Sample.Droid
17 | Properties\AndroidManifest.xml
18 | v5.0
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug
25 | DEBUG;
26 | prompt
27 | 4
28 | None
29 | false
30 | 1G
31 |
32 |
33 | full
34 | true
35 | bin\Release
36 | prompt
37 | 4
38 | false
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
48 |
49 |
50 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\FormsViewGroup.dll
51 |
52 |
53 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Core.dll
54 |
55 |
56 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
57 |
58 |
59 | ..\packages\Xamarin.Android.Support.v7.CardView.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
60 |
61 |
62 | ..\packages\Xamarin.Android.Support.v4.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
63 |
64 |
65 | ..\packages\Xamarin.Android.Support.v7.RecyclerView.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | {14C534B6-1984-41A9-A384-D3A5508588E3}
95 | CardView.Forms.Plugin.Abstractions
96 |
97 |
98 | {AD2D2DB4-E781-4CF1-9B62-3AAD264F196D}
99 | CardView.Forms.Plugin.Droid
100 |
101 |
102 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.iOSUnified/CardViewImplementation.cs:
--------------------------------------------------------------------------------
1 | using CardView.Forms.Plugin.Abstractions;
2 | using System;
3 | using Xamarin.Forms;
4 | using CardView.Forms.Plugin.iOSUnified;
5 | using Xamarin.Forms.Platform.iOS;
6 | using UIKit;
7 |
8 | [assembly: ExportRenderer(typeof(CardContentView), typeof(CardViewRenderer))]
9 |
10 | namespace CardView.Forms.Plugin.iOSUnified
11 | {
12 | ///
13 | /// CardView Renderer
14 | ///
15 | public class CardViewRenderer : iOSCardView, IVisualElementRenderer
16 | {
17 | public event EventHandler ElementChanged;
18 |
19 | private bool init;
20 |
21 | public CardContentView TheView
22 | {
23 | get { return this.Element == null ? null : (CardContentView)Element; }
24 | }
25 |
26 | public VisualElementTracker Tracker
27 | {
28 | get;
29 | private set;
30 | }
31 |
32 | public VisualElementPackager Packager
33 | {
34 | get;
35 | private set;
36 | }
37 |
38 | public VisualElement Element
39 | {
40 | get;
41 | private set;
42 | }
43 |
44 | public UIKit.UIView NativeView
45 | {
46 | get { return this as UIView; }
47 | }
48 |
49 | public UIKit.UIViewController ViewController
50 | {
51 | get
52 | {
53 | return null;
54 | }
55 | }
56 |
57 | public void SetElement(VisualElement element)
58 | {
59 | var oldElement = this.Element;
60 |
61 | if (oldElement != null)
62 | {
63 | oldElement.PropertyChanged -= this.HandlePropertyChanged;
64 | }
65 |
66 | this.Element = element;
67 |
68 | if (this.Element != null)
69 | {
70 | this.Element.PropertyChanged += this.HandlePropertyChanged;
71 | }
72 |
73 | this.RemoveAllSubviews();
74 | //sizes to match the forms view
75 | //updates properties, handles visual element properties
76 | this.Tracker = new VisualElementTracker(this);
77 |
78 | this.Packager = new VisualElementPackager(this);
79 | this.Packager.Load();
80 |
81 | this.SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
82 |
83 | this.SetCardBackgroundColor(this.TheView.BackgroundColor.ToUIColor());
84 |
85 | if (ElementChanged != null)
86 | {
87 | this.ElementChanged(this, new VisualElementChangedEventArgs(oldElement, this.Element));
88 | }
89 | }
90 |
91 | public SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
92 | {
93 | var size = UIViewExtensions.GetSizeRequest(this.NativeView, widthConstraint, heightConstraint, 44.0, 44.0);
94 |
95 | return size;
96 | }
97 |
98 | public void SetElementSize(Size size)
99 | {
100 | this.Element.Layout(new Rectangle(this.Element.X, this.Element.Y, size.Width, size.Height));
101 | }
102 |
103 | protected override void Dispose(bool disposing)
104 | {
105 | if (disposing)
106 | {
107 | if (this.Packager == null)
108 | {
109 | return;
110 | }
111 |
112 | this.SetElement((VisualElement) null);
113 | this.Packager.Dispose();
114 | this.Packager = (VisualElementPackager) null;
115 | this.Tracker.Dispose();
116 | this.Tracker = (VisualElementTracker) null;
117 | }
118 |
119 | base.Dispose(disposing);
120 | }
121 |
122 | private void HandlePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
123 | {
124 | if (e.PropertyName == "Content")
125 | {
126 | //// Tracker.UpdateLayout ();
127 | }
128 | else if (
129 | e.PropertyName == CardContentView.WidthProperty.PropertyName ||
130 | e.PropertyName == CardContentView.HeightProperty.PropertyName ||
131 | e.PropertyName == CardContentView.XProperty.PropertyName ||
132 | e.PropertyName == CardContentView.YProperty.PropertyName ||
133 | e.PropertyName == CardContentView.CornerRadiusProperty.PropertyName)
134 | {
135 | this.Element.Layout(this.Element.Bounds);
136 |
137 | var radius = (this.Element as CardContentView).CornderRadius;
138 | var bound = this.Element.Bounds;
139 | this.DrawBorder(new CoreGraphics.CGRect(bound.X, bound.Y, bound.Width, bound.Height), (nfloat)radius);
140 | }
141 | else if (e.PropertyName == CardContentView.PaddingProperty.PropertyName)
142 | {
143 | SetContentPadding((int)TheView.Padding.Left, (int)TheView.Padding.Top, (int)TheView.Padding.Right, (int)TheView.Padding.Bottom);
144 | }
145 | else if (e.PropertyName == CardContentView.BackgroundColorProperty.PropertyName)
146 | {
147 | if (TheView.BackgroundColor != null)
148 | {
149 | SetCardBackgroundColor(TheView.BackgroundColor.ToUIColor());
150 | }
151 | }
152 | }
153 |
154 | private void SetCardBackgroundColor(UIColor color)
155 | {
156 | this.BackgroundColor = color;
157 | }
158 |
159 | private void SetContentPadding(int left, int top, int right, int bottom)
160 | {
161 | // TODO: maybe??
162 | }
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/Popup Image View/iOS/PopupImageViewRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms.Platform.iOS;
3 | using Xamarin.Forms;
4 | using UIKit;
5 | using CoreGraphics;
6 | using ImageTest;
7 |
8 | [assembly: ExportRenderer(typeof(PopupImageView), typeof(PopupImageViewRenderer))]
9 | namespace ImageTest
10 | {
11 | public class PopupImageViewRenderer : ImageRenderer
12 | {
13 | UIViewFullscreen vMain;
14 |
15 | protected override void OnElementChanged(ElementChangedEventArgs e)
16 | {
17 | base.OnElementChanged(e);
18 |
19 | if (e.NewElement != null)
20 | {
21 | (e.NewElement as PopupImageView).PopupRequested += HandlePopupRequested;
22 | }
23 | else if (e.OldElement != null)
24 | {
25 | (e.OldElement as PopupImageView).PopupRequested -= HandlePopupRequested;
26 | }
27 | }
28 |
29 | private void HandlePopupRequested(object sender, EventArgs e)
30 | {
31 | if (vMain == null)
32 | {
33 | vMain = new UIViewFullscreen();
34 | }
35 |
36 | vMain.SetImage(this.Control.Image);
37 | vMain.Show();
38 | }
39 |
40 | protected override void Dispose(bool disposing)
41 | {
42 | if (disposing)
43 | {
44 | this.vMain = null;
45 | }
46 |
47 | base.Dispose(disposing);
48 | }
49 |
50 | ///
51 | /// UIView used to fill the entire window and overlay over current view controller
52 | ///
53 | public class UIViewFullscreen : UIView
54 | {
55 | UIImage iImage;
56 | UIScrollViewImage sviMain;
57 |
58 | public bool UseAnimation = true;
59 | public float AnimationDuration = 0.3f;
60 |
61 | public UIViewFullscreen()
62 | {
63 | var cBackground = new UIColor(0.0f, 0.0f, 0.0f, 0.6f);
64 | BackgroundColor = cBackground;
65 |
66 | sviMain = new UIScrollViewImage();
67 | AddSubview(sviMain);
68 | }
69 |
70 | public void SetImage(UIImage image)
71 | {
72 | iImage = image;
73 | }
74 |
75 | public void Show()
76 | {
77 | var window = UIApplication.SharedApplication.Windows[0];
78 | Frame = window.Frame;
79 | sviMain.Frame = window.Frame;
80 | sviMain.SetImage(iImage);
81 | sviMain.OnSingleTap += () =>
82 | {
83 | Hide();
84 | };
85 |
86 | window.AddSubview(this);
87 |
88 | Alpha = 0f;
89 | UIView.Animate(AnimationDuration, () =>
90 | {
91 | Alpha = 1f;
92 | });
93 | }
94 |
95 | public void Hide()
96 | {
97 | if (Superview != null)
98 | {
99 | if (!UseAnimation)
100 | {
101 | RemoveFromSuperview();
102 | }
103 | else
104 | {
105 | Alpha = 1f;
106 | UIView.Animate(AnimationDuration, () =>
107 | {
108 | Alpha = 0f;
109 | }, () =>
110 | {
111 | RemoveFromSuperview();
112 | });
113 | }
114 | }
115 | }
116 | }
117 |
118 | ///
119 | /// Scrollview used to display the image & allow it to scale to fill the window
120 | ///
121 | public class UIScrollViewImage : UIScrollView
122 | {
123 | nfloat defaultZoom = 2f;
124 | nfloat minZoom = 0.1f;
125 | nfloat maxZoom = 3f;
126 | nfloat sizeToFitZoom = 1f;
127 |
128 | UIImageView ivMain;
129 |
130 | UITapGestureRecognizer grTap;
131 | UITapGestureRecognizer grDoubleTap;
132 |
133 | public event Action OnSingleTap;
134 |
135 | public override CGRect Frame
136 | {
137 | get
138 | {
139 | return base.Frame;
140 | }
141 | set
142 | {
143 | base.Frame = value;
144 |
145 | if (ivMain != null)
146 | {
147 | ivMain.Frame = value;
148 | }
149 | }
150 | }
151 |
152 | public UIScrollViewImage()
153 | {
154 | AutoresizingMask = UIViewAutoresizing.All;
155 |
156 | ivMain = new UIImageView();
157 | // ivMain.AutoresizingMask = UIViewAutoresizing.All;
158 | ivMain.ContentMode = UIViewContentMode.ScaleAspectFit;
159 | // ivMain.BackgroundColor = UIColor.Red; // DEBUG
160 | AddSubview(ivMain);
161 |
162 | ScrollEnabled = false;
163 |
164 | // Setup zoom
165 | MaximumZoomScale = 3.0f;
166 | MinimumZoomScale = 0.1f;
167 | ShowsVerticalScrollIndicator = false;
168 | ShowsHorizontalScrollIndicator = false;
169 | BouncesZoom = true;
170 | ViewForZoomingInScrollView += (UIScrollView sv) =>
171 | {
172 | return ivMain;
173 | };
174 |
175 | // Setup gestures
176 | grTap = new UITapGestureRecognizer(() =>
177 | {
178 | if (OnSingleTap != null)
179 | {
180 | OnSingleTap();
181 | }
182 | });
183 | grTap.NumberOfTapsRequired = 1;
184 | AddGestureRecognizer(grTap);
185 | }
186 |
187 | public void SetImage(UIImage image)
188 | {
189 | ZoomScale = 1;
190 |
191 | ivMain.Image = image;
192 | ivMain.Frame = new CGRect(new CGPoint(), image.Size);
193 | ContentSize = image.Size;
194 |
195 | double wScale = (double)(Frame.Width / image.Size.Width);
196 | double hScale = (double)(Frame.Height / image.Size.Height);
197 |
198 | MinimumZoomScale = (nfloat)Math.Min(wScale, hScale);
199 | sizeToFitZoom = MinimumZoomScale;
200 | ZoomScale = MinimumZoomScale;
201 |
202 | ivMain.Frame = CenterScrollViewContents();
203 | }
204 |
205 | public override void LayoutSubviews()
206 | {
207 | base.LayoutSubviews();
208 | ivMain.Frame = CenterScrollViewContents();
209 | }
210 |
211 | public CGRect CenterScrollViewContents()
212 | {
213 | var boundsSize = Bounds.Size;
214 | var contentsFrame = ivMain.Frame;
215 |
216 | if (contentsFrame.Width < boundsSize.Width)
217 | {
218 | contentsFrame.X = (boundsSize.Width - contentsFrame.Width) / 2;
219 | }
220 | else
221 | {
222 | contentsFrame.X = 0;
223 | }
224 |
225 | if (contentsFrame.Height < boundsSize.Height)
226 | {
227 | contentsFrame.Y = (boundsSize.Height - contentsFrame.Height) / 2;
228 | }
229 | else
230 | {
231 | contentsFrame.Y = 0;
232 | }
233 |
234 | return contentsFrame;
235 | }
236 | }
237 | }
238 | }
239 |
240 |
--------------------------------------------------------------------------------
/CardView/CardView/CardView.Forms.Plugin.Android/CardView.Forms.Plugin.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {AD2D2DB4-E781-4CF1-9B62-3AAD264F196D}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | Library
9 | Properties
10 | CardView.Forms.Plugin.Droid
11 | CardView.Forms.Plugin.Android
12 | 512
13 | Resources\Resource.Designer.cs
14 | Off
15 | True
16 | True
17 | 01e4adf3
18 | v5.0
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 | bin\Release\CardView.Forms.Plugin.Android.XML
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\FormsViewGroup.dll
47 |
48 |
49 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Core.dll
50 |
51 |
52 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
53 |
54 |
55 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
56 |
57 |
58 | ..\..\packages\Xamarin.Android.Support.v7.CardView.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll
59 |
60 |
61 | ..\..\packages\Xamarin.Android.Support.v4.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
62 |
63 |
64 | ..\..\packages\Xamarin.Android.Support.v7.RecyclerView.22.2.0.0-beta3\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | {14C534B6-1984-41A9-A384-D3A5508588E3}
82 | CardView.Forms.Plugin.Abstractions
83 |
84 |
85 |
86 |
87 |
88 |
89 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
90 |
91 |
92 |
93 |
100 |
--------------------------------------------------------------------------------
/ExtendedMaps/Sample/Droid/ExtendedMaps.Sample.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
7 | {69A0609B-287A-41BD-9C45-44BB8D736589}
8 | Library
9 | ExtendedMaps.Sample.Droid
10 | Assets
11 | Resources
12 | Resource
13 | Resources\Resource.designer.cs
14 | True
15 | True
16 | ExtendedMapsSample.Droid
17 | Properties\AndroidManifest.xml
18 | v5.0
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug
25 | DEBUG;
26 | prompt
27 | 4
28 | None
29 | false
30 | True
31 |
32 |
33 | full
34 | true
35 | bin\Release
36 | prompt
37 | 4
38 | false
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
48 |
49 |
50 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\FormsViewGroup.dll
51 |
52 |
53 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Core.dll
54 |
55 |
56 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
57 |
58 |
59 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
60 |
61 |
62 | ..\..\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll
63 |
64 |
65 | ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll
66 |
67 |
68 | ..\..\packages\Xamarin.GooglePlayServices.22.0.0.0\lib\MonoAndroid41\GooglePlayServicesLib.dll
69 |
70 |
71 | ..\..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll
72 |
73 |
74 | ..\..\packages\Xamarin.Forms.Maps.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Maps.Android.dll
75 |
76 |
77 | ..\..\packages\Xamarin.Forms.Maps.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Maps.dll
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | {C1902CCB-6C9B-46DA-9ABD-419A8F53BD13}
107 | ExtendedMaps
108 |
109 |
110 | {FBDA6636-327A-46C3-99B1-D4ED88C0B4AF}
111 | ExtendedMaps.Droid
112 |
113 |
114 |
--------------------------------------------------------------------------------