summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.MacOS
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.ControlGallery.MacOS')
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/AppDelegate.cs246
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128.pngbin0 -> 8125 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128@2x.pngbin0 -> 20798 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16.pngbin0 -> 711 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16@2x.pngbin0 -> 1484 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256.pngbin0 -> 20798 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256@2x.pngbin0 -> 59335 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32.pngbin0 -> 1484 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32@2x.pngbin0 -> 3428 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512.pngbin0 -> 59335 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512@2x.pngbin0 -> 177632 bytes
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/Contents.json68
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/Contents.json6
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/BrokenNativeControl.cs23
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/CustomRenderers.cs346
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Entitlements.plist6
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Info.plist37
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Main.cs14
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs83
-rw-r--r--Xamarin.Forms.ControlGallery.MacOS/Xamarin.Forms.ControlGallery.MacOS.csproj395
20 files changed, 1224 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.MacOS/AppDelegate.cs b/Xamarin.Forms.ControlGallery.MacOS/AppDelegate.cs
new file mode 100644
index 0000000..ac4940d
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/AppDelegate.cs
@@ -0,0 +1,246 @@
+using System;
+using System.Globalization;
+using AppKit;
+using CoreGraphics;
+using Foundation;
+using Xamarin.Forms.Controls;
+using Xamarin.Forms.Controls.Issues;
+using Xamarin.Forms.Platform.MacOS;
+
+namespace Xamarin.Forms.ControlGallery.MacOS
+{
+ [Register("AppDelegate")]
+ public class AppDelegate : FormsApplicationDelegate
+ {
+
+ NSWindow _window;
+ public AppDelegate()
+ {
+ ObjCRuntime.Runtime.MarshalManagedException += (sender, args) =>
+ {
+ Console.WriteLine(args.Exception.ToString());
+ };
+
+ var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
+
+ var rect = new CoreGraphics.CGRect(200, 1000, 1024, 768);
+ //var rect = NSWindow.FrameRectFor(NSScreen.MainScreen.Frame, style);
+ _window = new NSWindow(rect, style, NSBackingStore.Buffered, false);
+ _window.Title = "Twitter XF Mac";
+ _window.TitleVisibility = NSWindowTitleVisibility.Hidden;
+ }
+
+ public override NSWindow MainWindow
+ {
+ get { return _window; }
+ }
+
+ public override void DidFinishLaunching(NSNotification notification)
+ {
+ Forms.Init();
+ FormsMaps.Init();
+
+ var app = new App();
+ // When the native control gallery loads up, it'll let us know so we can add the nested native controls
+ MessagingCenter.Subscribe<NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);
+ MessagingCenter.Subscribe<Bugzilla40911>(this, Bugzilla40911.ReadyToSetUp40911Test, SetUp40911Test);
+
+ // When the native binding gallery loads up, it'll let us know so we can set up the native bindings
+ MessagingCenter.Subscribe<NativeBindingGalleryPage>(this, NativeBindingGalleryPage.ReadyForNativeBindingsMessage, AddNativeBindings);
+
+ LoadApplication(app);
+ base.DidFinishLaunching(notification);
+ }
+
+ void AddNativeControls(NestedNativeControlGalleryPage page)
+ {
+ if (page.NativeControlsAdded)
+ {
+ return;
+ }
+
+ StackLayout sl = page.Layout;
+
+ // Create and add a native UILabel
+ var originalText = "I am a native UILabel";
+ var longerText =
+ "I am a native UILabel with considerably more text. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
+
+ var uilabel = new NSTextField
+ {
+ StringValue = originalText,
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ Font = NSFont.FromFontName("Helvetica", 24f)
+ };
+
+ sl?.Children.Add(uilabel);
+
+ // Create and add a native Button
+ var uibutton = NSButtonExtensions.CreateButton("Toggle Text Amount", () =>
+ {
+ uilabel.StringValue = uilabel.StringValue == originalText ? longerText : originalText;
+ uilabel.SizeToFit();
+ });
+ uibutton.Font = NSFont.FromFontName("Helvetica", 14f);
+
+
+ sl?.Children.Add(uibutton.ToView());
+
+ // Create some control which we know don't behave correctly with regard to measurement
+ var difficultControl0 = new BrokenNativeControl
+ {
+ Font = NSFont.FromFontName("Helvetica", 14f),
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ StringValue = "Doesn't play nice with sizing. That's why there's a big gap around it."
+ };
+
+ var difficultControl1 = new BrokenNativeControl
+ {
+ Font = NSFont.FromFontName("Helvetica", 14f),
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ StringValue = "Custom size fix specified. No gaps."
+ };
+
+ var explanation0 = new NSTextField
+ {
+ StringValue = "The next control is a customized label with a bad SizeThatFits implementation.",
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ Font = NSFont.FromFontName("Helvetica", 14f),
+ };
+
+ var explanation1 = new NSTextField
+ {
+ StringValue = "The next control is the same broken class as above, but we pass in an override to the GetDesiredSize method.",
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ Font = NSFont.FromFontName("Helvetica", 14f),
+ };
+
+ // Add a misbehaving control
+ sl?.Children.Add(explanation0);
+ sl?.Children.Add(difficultControl0);
+
+ // Add the misbehaving control with a custom delegate for FixSize
+ sl?.Children.Add(explanation1);
+ sl?.Children.Add(difficultControl1, FixSize);
+
+ page.NativeControlsAdded = true;
+ }
+
+ SizeRequest? FixSize(NativeViewWrapperRenderer renderer, double width, double height)
+ {
+ var uiView = renderer.Control;
+ var view = renderer.Element;
+
+ if (uiView == null || view == null)
+ {
+ return null;
+ }
+
+ var constraint = new CGSize(width, height);
+
+ // Let the BrokenNativeControl determine its size (which we know will be wrong)
+ var badRect = uiView.FittingSize;
+
+ // And we'll use the width (which is fine) and substitute our own height
+ return new SizeRequest(new Size(badRect.Width, 20));
+ }
+
+ void AddNativeBindings(NativeBindingGalleryPage page)
+ {
+ if (page.NativeControlsAdded)
+ return;
+
+ StackLayout sl = page.Layout;
+
+ int width = 200;
+ int heightCustomLabelView = 100;
+
+ var uilabel = new NSTextField(new CGRect(0, 0, width, heightCustomLabelView))
+ {
+ BackgroundColor = NSColor.Clear,
+ Editable = false,
+ Bezeled = false,
+ DrawsBackground = false,
+ MaximumNumberOfLines = 0,
+ LineBreakMode = NSLineBreakMode.ByWordWrapping,
+ Font = NSFont.FromFontName("Helvetica", 24f),
+ StringValue = "DefaultText"
+ };
+
+ var uibuttonColor = NSButtonExtensions.CreateButton("Toggle Text Color Binding", () => uilabel.TextColor = NSColor.Blue);
+ uibuttonColor.Font = NSFont.FromFontName("Helvetica", 14f);
+
+ uilabel.SetBinding("StringValue", new Binding("NativeLabel"));
+ uilabel.SetBinding(nameof(uilabel.TextColor), new Binding("NativeLabelColor", converter: new ColorConverter()));
+
+ sl?.Children.Add(uilabel);
+ sl?.Children.Add(uibuttonColor.ToView());
+ //var colorPicker = new NSColorWell();
+ //colorPicker.SetBinding("SelectedColor", new Binding("NativeLabelColor", BindingMode.TwoWay, new ColorConverter()), "ColorPicked");
+ //sl?.Children.Add(colorPicker);
+ page.NativeControlsAdded = true;
+ }
+
+ #region Stuff for repro of Bugzilla case 40911
+
+ void SetUp40911Test(Bugzilla40911 page)
+ {
+ var button = new Button { Text = "Start" };
+
+ button.Clicked += (s, e) =>
+ {
+ StartPressed40911();
+ };
+
+ page.Layout.Children.Add(button);
+ }
+
+ public void StartPressed40911()
+ {
+ var loginViewController = new NSViewController { View = { } };
+ var button = NSButtonExtensions.CreateButton("Login", () =>
+ {
+ Xamarin.Forms.Application.Current.MainPage = new ContentPage { Content = new Label { Text = "40911 Success" } };
+ //loginViewController.DismissViewController()true, null);
+
+ });
+
+ button.Frame = new CGRect(20, 100, 200, 44);
+ loginViewController.View.AddSubview(button);
+
+ var window = NSApplication.SharedApplication.KeyWindow;
+ var vc = window.ContentViewController;
+ while (vc.PresentedViewControllers.Length > 0)
+ {
+ vc = vc.PresentedViewControllers[0];
+ }
+
+ //vc.PresentViewController(loginViewController, new NSViewControllerPresentationAnimator();
+ }
+
+ #endregion
+
+ public class ColorConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is Color)
+ return ((Color)value).ToNSColor();
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is NSColor)
+ return ((NSColor)value).ToColor();
+ return value;
+ }
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128.png
new file mode 100644
index 0000000..d0b5a80
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128@2x.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128@2x.png
new file mode 100644
index 0000000..f4c8d29
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-128@2x.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16.png
new file mode 100644
index 0000000..ebb5a0f
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16@2x.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16@2x.png
new file mode 100644
index 0000000..0986d31
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-16@2x.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256.png
new file mode 100644
index 0000000..f4c8d29
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256@2x.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256@2x.png
new file mode 100644
index 0000000..a142c83
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-256@2x.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32.png
new file mode 100644
index 0000000..0986d31
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32@2x.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32@2x.png
new file mode 100644
index 0000000..412d6ca
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-32@2x.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512.png
new file mode 100644
index 0000000..a142c83
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512@2x.png b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512@2x.png
new file mode 100644
index 0000000..e99022a
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/AppIcon-512@2x.png
Binary files differ
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/Contents.json b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/Contents.json
new file mode 100644
index 0000000..6b28545
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/AppIcons.appiconset/Contents.json
@@ -0,0 +1,68 @@
+{
+ "images": [
+ {
+ "filename": "AppIcon-16.png",
+ "size": "16x16",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-16@2x.png",
+ "size": "16x16",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-32.png",
+ "size": "32x32",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-32@2x.png",
+ "size": "32x32",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-128.png",
+ "size": "128x128",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-128@2x.png",
+ "size": "128x128",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-256.png",
+ "size": "256x256",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-256@2x.png",
+ "size": "256x256",
+ "scale": "2x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-512.png",
+ "size": "512x512",
+ "scale": "1x",
+ "idiom": "mac"
+ },
+ {
+ "filename": "AppIcon-512@2x.png",
+ "size": "512x512",
+ "scale": "2x",
+ "idiom": "mac"
+ }
+ ],
+ "info": {
+ "version": 1,
+ "author": "xcode"
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/Contents.json b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..4caf392
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.ControlGallery.MacOS/BrokenNativeControl.cs b/Xamarin.Forms.ControlGallery.MacOS/BrokenNativeControl.cs
new file mode 100644
index 0000000..5c35366
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/BrokenNativeControl.cs
@@ -0,0 +1,23 @@
+using System;
+using AppKit;
+using CoreGraphics;
+
+namespace Xamarin.Forms.ControlGallery.MacOS
+{
+ /// <summary>
+ /// This is a custom Android control which deliberately does some incorrect measuring/layout
+ /// </summary>
+ public class BrokenNativeControl : NSTextField
+ {
+ public override string StringValue
+ {
+ get { return base.StringValue; }
+ set { base.StringValue = value.ToUpper(); }
+ }
+
+ public override CGSize SizeThatFits(CGSize size)
+ {
+ return new CGSize(size.Width, 150);
+ }
+ }
+}
diff --git a/Xamarin.Forms.ControlGallery.MacOS/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.MacOS/CustomRenderers.cs
new file mode 100644
index 0000000..ae05889
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/CustomRenderers.cs
@@ -0,0 +1,346 @@
+using System;
+using System.Collections.Generic;
+using AppKit;
+using CoreGraphics;
+using Foundation;
+using Xamarin.Forms;
+using Xamarin.Forms.ControlGallery.MacOS;
+using Xamarin.Forms.Controls.Issues;
+using Xamarin.Forms.Platform.MacOS;
+
+[assembly: ExportRenderer(typeof(NativeCell), typeof(NativeMacCellRenderer))]
+[assembly: ExportRenderer(typeof(NativeListView2), typeof(NativeMacOSListViewRenderer))]
+[assembly: ExportRenderer(typeof(NativeListView), typeof(NativeListViewRenderer))]
+namespace Xamarin.Forms.ControlGallery.MacOS
+{
+ public class NativeMacOSListViewRenderer : ViewRenderer<NativeListView2, NSView>
+ {
+ NSTableView _nsTableView;
+ public NativeMacOSListViewRenderer()
+ {
+ }
+
+ protected override void OnElementChanged(ElementChangedEventArgs<NativeListView2> e)
+ {
+ base.OnElementChanged(e);
+
+ if (Control == null)
+ {
+ var scroller = new NSScrollView
+ {
+ AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable,
+ DocumentView = _nsTableView = new NSTableView().AsListViewLook()
+ };
+
+ _nsTableView.RowHeight = 60;
+ SetNativeControl(scroller);
+ }
+
+ if (e.OldElement != null)
+ {
+ // unsubscribe
+ }
+
+ if (e.NewElement != null)
+ {
+ // subscribe
+
+ var s = new NativeiOSListViewSource(e.NewElement, _nsTableView);
+ _nsTableView.Source = s;
+ }
+ }
+
+ protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ base.OnElementPropertyChanged(sender, e);
+
+ if (e.PropertyName == NativeListView.ItemsProperty.PropertyName)
+ {
+ // update the Items list in the UITableViewSource
+ var s = new NativeiOSListViewSource(Element, _nsTableView);
+ _nsTableView.Source = s;
+ }
+ }
+
+ public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
+ {
+ return Control.GetSizeRequest(widthConstraint, heightConstraint, 44, 44);
+ }
+ }
+
+ public class NativeListViewRenderer : ViewRenderer<NativeListView, NSView>
+ {
+ public NativeListViewRenderer()
+ {
+ }
+ NSTableView table;
+ protected override void OnElementChanged(ElementChangedEventArgs<NativeListView> e)
+ {
+ base.OnElementChanged(e);
+
+ if (Control == null)
+ {
+ var scroller = new NSScrollView
+ {
+ AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable,
+ DocumentView = table = new NSTableView().AsListViewLook()
+ };
+
+ table.RowHeight = 60;
+
+ SetNativeControl(scroller);
+ }
+
+ if (e.OldElement != null)
+ {
+ // unsubscribe
+ }
+
+ if (e.NewElement != null)
+ {
+ // subscribe
+
+ var s = new NativeListViewSource(e.NewElement, table);
+ table.Source = s;
+ }
+ }
+
+ protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ base.OnElementPropertyChanged(sender, e);
+
+ if (e.PropertyName == NativeListView.ItemsProperty.PropertyName)
+ {
+ // update the Items list in the UITableViewSource
+ var s = new NativeListViewSource(Element, table);
+ table.Source = s;
+ }
+ }
+
+ public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
+ {
+ return Control.GetSizeRequest(widthConstraint, heightConstraint, 44, 44);
+ }
+ }
+
+ public class NativeiOSListViewSource : NSTableViewSource
+ {
+ IList<DataSource> _tableItems;
+ NativeListView2 _listView;
+ readonly NSTableView _nsTableView;
+ readonly NSString _cellIdentifier = new NSString("TableCell");
+
+ public IEnumerable<DataSource> Items
+ {
+ set { _tableItems = new List<DataSource>(value); }
+ }
+
+ public NativeiOSListViewSource(NativeListView2 view, NSTableView nsTableView)
+ {
+ _tableItems = new List<DataSource>(view.Items);
+ _listView = view;
+ _nsTableView = nsTableView;
+ }
+
+ public override nint GetRowCount(NSTableView tableView)
+ {
+ return _tableItems.Count;
+ }
+
+ public override void SelectionDidChange(NSNotification notification)
+ {
+ var selectedRow = (int)_nsTableView.SelectedRow;
+ if (selectedRow == -1)
+ return;
+ _listView.NotifyItemSelected(_tableItems[selectedRow]);
+ Console.WriteLine("Row " + selectedRow.ToString() + " selected");
+ _nsTableView.DeselectRow(selectedRow);
+ }
+
+ public override NSView GetViewForItem(NSTableView tableView, NSTableColumn tableColumn, nint row)
+ {
+ NativeMacOsCell cell = tableView.MakeView(_cellIdentifier, tableView) as NativeMacOsCell;
+
+ if (cell == null)
+ {
+ cell = new NativeMacOsCell(_cellIdentifier);
+ }
+ int rowNumber = (int)row;
+ if (string.IsNullOrWhiteSpace(_tableItems[rowNumber].ImageFilename))
+ {
+ cell.UpdateCell(_tableItems[rowNumber].Name
+ , _tableItems[rowNumber].Category
+ , null);
+ }
+ else
+ {
+ cell.UpdateCell(_tableItems[rowNumber].Name
+ , _tableItems[rowNumber].Category
+ , new NSImage("Images/" + _tableItems[rowNumber].ImageFilename + ".jpg"));
+ }
+
+ return cell;
+ }
+ }
+
+ public class NativeListViewSource : NSTableViewSource
+ {
+ // declare vars
+ IList<string> _tableItems;
+ string _cellIdentifier = "TableCell";
+ NativeListView _listView;
+ readonly NSTableView _nsTableView;
+
+ public IEnumerable<string> Items
+ {
+ set
+ {
+ _tableItems = new List<string>(value);
+ }
+ }
+
+ public NativeListViewSource(NativeListView view, NSTableView nsTableView)
+ {
+ _tableItems = new List<string>(view.Items);
+ _listView = view;
+ _nsTableView = nsTableView;
+ }
+
+ public override nint GetRowCount(NSTableView tableView)
+ {
+ return _tableItems.Count;
+ }
+
+ public override void SelectionDidChange(NSNotification notification)
+ {
+ var selectedRow = (int)_nsTableView.SelectedRow;
+ if (selectedRow == -1)
+ return;
+ _listView.NotifyItemSelected(_tableItems[selectedRow]);
+ Console.WriteLine("Row " + selectedRow.ToString() + " selected");
+ _nsTableView.DeselectRow(selectedRow);
+ }
+
+ public override NSView GetViewForItem(NSTableView tableView, NSTableColumn tableColumn, nint row)
+ {
+ var cell = tableView.MakeView(_cellIdentifier, tableView);
+
+ if (cell == null)
+ {
+ cell = new NSView(new CGRect(0, 0, tableView.Frame.Width, tableView.RowHeight));
+ var textLabel = new NSTextField(new CGRect(1, 1, tableView.Frame.Width, tableView.RowHeight - 10));
+ cell.AddSubview(textLabel);
+ }
+ var label = cell.Subviews[0] as NSTextField;
+ label.StringValue = _tableItems[(int)row];
+ return cell;
+ }
+ }
+
+ public class NativeMacCellRenderer : ViewCellRenderer
+ {
+ static NSString s_rid = new NSString("NativeCell");
+
+ public NativeMacCellRenderer()
+ {
+ }
+
+ public override NSView GetCell(Cell item, NSView reusableView, NSTableView tv)
+ {
+ var x = (NativeCell)item;
+ Console.WriteLine(x);
+
+ NativeMacOsCell c = reusableView as NativeMacOsCell;
+
+ if (c == null)
+ {
+ c = new NativeMacOsCell(s_rid);
+ }
+
+ NSImage i = null;
+ if (!string.IsNullOrWhiteSpace(x.ImageFilename))
+ {
+ i = new NSImage("Images/" + x.ImageFilename + ".jpg");
+ }
+
+ base.WireUpForceUpdateSizeRequested(item, c, tv);
+
+ c.UpdateCell(x.Name, x.Category, i);
+
+ return c;
+ }
+ }
+
+ public class NativeMacOsCell : NSView
+ {
+ NSTextField _headingLabel;
+ NSTextField _subheadingLabel;
+ NSImageView _imageView;
+
+ public NativeMacOsCell() : this(new NSString("NativeMacOsCell"))
+ {
+ }
+ public NativeMacOsCell(NSString cellId)
+ {
+ Identifier = cellId;
+ WantsLayer = true;
+ Layer.BackgroundColor = NSColor.FromRgb(218, 255, 127).CGColor;
+
+ _imageView = new NSImageView();
+
+ _headingLabel = new NSTextField()
+ {
+ Font = NSFont.FromFontName("Cochin-BoldItalic", 22f),
+ TextColor = NSColor.FromRgb(127, 51, 0),
+ BackgroundColor = NSColor.Clear
+ };
+
+ _subheadingLabel = new NSTextField()
+ {
+ Font = NSFont.FromFontName("AmericanTypewriter", 12f),
+ TextColor = NSColor.FromRgb(38, 127, 0),
+ Alignment = NSTextAlignment.Center,
+ BackgroundColor = NSColor.Clear
+ };
+
+ AddSubview(_headingLabel);
+ AddSubview(_subheadingLabel);
+ AddSubview(_imageView);
+ }
+
+ public void UpdateCell(string caption, string subtitle, NSImage image)
+ {
+ _imageView.Image = image;
+ _headingLabel.StringValue = caption;
+ _subheadingLabel.StringValue = subtitle;
+ }
+
+ public override void Layout()
+ {
+ base.Layout();
+
+ _imageView.Frame = new CGRect(Bounds.Width - 63, 5, 33, 33);
+ _headingLabel.Frame = new CGRect(5, 4, Bounds.Width - 63, 25);
+ _subheadingLabel.Frame = new CGRect(100, 18, 100, 20);
+ }
+ }
+
+ public static class NSTableViewExtensions
+ {
+ public static NSTableView AsListViewLook(this NSTableView self)
+ {
+ self.SelectionHighlightStyle = NSTableViewSelectionHighlightStyle.SourceList;
+
+ self.AllowsColumnReordering = false;
+ self.AllowsColumnResizing = false;
+ self.AllowsColumnSelection = false;
+
+ //this is needed .. can we go around it ?
+ self.AddColumn(new NSTableColumn("1"));
+ //this line hides the header by default
+ self.HeaderView = null;
+ return self;
+ }
+ }
+
+}
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Entitlements.plist b/Xamarin.Forms.ControlGallery.MacOS/Entitlements.plist
new file mode 100644
index 0000000..9ae5993
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Entitlements.plist
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+</dict>
+</plist>
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Info.plist b/Xamarin.Forms.ControlGallery.MacOS/Info.plist
new file mode 100644
index 0000000..da20b03
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Info.plist
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleName</key>
+ <string>Xamarin.Forms.ControlGallery.MacOS</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.xamarin.xamarin-forms-controlgallery-macos</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.10</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>rmarinho</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>XSAppIconAssets</key>
+ <string>Assets.xcassets/AppIcons.appiconset</string>
+ <key>LSApplicationCategoryType</key>
+ <string>public.app-category.developer-tools</string>
+ <key>NSAppTransportSecurity</key>
+ <dict>
+ <key>NSAllowsArbitraryLoads</key>
+ <true/>
+ </dict>
+</dict>
+</plist>
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Main.cs b/Xamarin.Forms.ControlGallery.MacOS/Main.cs
new file mode 100644
index 0000000..72dfdb5
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Main.cs
@@ -0,0 +1,14 @@
+using AppKit;
+
+namespace Xamarin.Forms.ControlGallery.MacOS
+{
+ static class MainClass
+ {
+ static void Main(string[] args)
+ {
+ NSApplication.Init();
+ NSApplication.SharedApplication.Delegate = new AppDelegate();
+ NSApplication.Main(args);
+ }
+ }
+}
diff --git a/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs b/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs
new file mode 100644
index 0000000..1b813a4
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/NativeServices.cs
@@ -0,0 +1,83 @@
+using System;
+using System.IO;
+using Xamarin.Forms;
+using Xamarin.Forms.ControlGallery.MacOS;
+using Xamarin.Forms.Controls;
+using Xamarin.Forms.Platform.MacOS;
+
+[assembly: Dependency(typeof(TestCloudService))]
+[assembly: Dependency(typeof(StringProvider))]
+[assembly: Dependency(typeof(CacheService))]
+[assembly: ExportRenderer(typeof(DisposePage), typeof(DisposePageRenderer))]
+[assembly: ExportRenderer(typeof(DisposeLabel), typeof(DisposeLabelRenderer))]
+
+namespace Xamarin.Forms.ControlGallery.MacOS
+{
+ public class CacheService : ICacheService
+ {
+ public void ClearImageCache()
+ {
+ var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+ var cache = Path.Combine(documents, ".config", ".isolated-storage", "ImageLoaderCache");
+ foreach (var file in Directory.GetFiles(cache))
+ {
+ File.Delete(file);
+ }
+ }
+ }
+
+ public class DisposePageRenderer : PageRenderer
+ {
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ ((DisposePage)Element).SendRendererDisposed();
+ }
+ base.Dispose(disposing);
+
+ }
+ }
+
+ public class DisposeLabelRenderer : LabelRenderer
+ {
+ protected override void Dispose(bool disposing)
+ {
+
+ if (disposing)
+ {
+ ((DisposeLabel)Element).SendRendererDisposed();
+ }
+ base.Dispose(disposing);
+ }
+ }
+
+ public class StringProvider : IStringProvider
+ {
+ public string CoreGalleryTitle
+ {
+ get { return "iOS Core Gallery"; }
+ }
+ }
+
+ public class TestCloudService : ITestCloudService
+ {
+ public bool IsOnTestCloud()
+ {
+ var isInTestCloud = Environment.GetEnvironmentVariable("XAMARIN_TEST_CLOUD");
+
+ return isInTestCloud != null && isInTestCloud.Equals("1");
+ }
+
+ public string GetTestCloudDeviceName()
+ {
+ return Environment.GetEnvironmentVariable("XTC_DEVICE_NAME");
+ }
+
+ public string GetTestCloudDevice()
+ {
+ return Environment.GetEnvironmentVariable("XTC_DEVICE");
+ }
+ }
+}
+
diff --git a/Xamarin.Forms.ControlGallery.MacOS/Xamarin.Forms.ControlGallery.MacOS.csproj b/Xamarin.Forms.ControlGallery.MacOS/Xamarin.Forms.ControlGallery.MacOS.csproj
new file mode 100644
index 0000000..af78b60
--- /dev/null
+++ b/Xamarin.Forms.ControlGallery.MacOS/Xamarin.Forms.ControlGallery.MacOS.csproj
@@ -0,0 +1,395 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}</ProjectGuid>
+ <ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Xamarin.Forms.ControlGallery.MacOS</RootNamespace>
+ <AssemblyName>Xamarin.Forms.ControlGallery.MacOS</AssemblyName>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
+ <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <EnableCodeSigning>false</EnableCodeSigning>
+ <CodeSigningKey>Mac Developer</CodeSigningKey>
+ <CreatePackage>false</CreatePackage>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <IncludeMonoRuntime>false</IncludeMonoRuntime>
+ <UseSGen>true</UseSGen>
+ <UseRefCounting>true</UseRefCounting>
+ <Profiling>true</Profiling>
+ <HttpClientHandler></HttpClientHandler>
+ <TlsProvider></TlsProvider>
+ <LinkMode></LinkMode>
+ <XamMacArch></XamMacArch>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <DefineConstants></DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <EnableCodeSigning>true</EnableCodeSigning>
+ <CodeSigningKey>Developer ID Application</CodeSigningKey>
+ <CreatePackage>true</CreatePackage>
+ <EnablePackageSigning>false</EnablePackageSigning>
+ <IncludeMonoRuntime>true</IncludeMonoRuntime>
+ <UseSGen>true</UseSGen>
+ <UseRefCounting>true</UseRefCounting>
+ <LinkMode>SdkOnly</LinkMode>
+ <HttpClientHandler></HttpClientHandler>
+ <TlsProvider></TlsProvider>
+ <XamMacArch></XamMacArch>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="Xamarin.Mac" />
+ </ItemGroup>
+ <ItemGroup>
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\Contents.json" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-128.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-128%402x.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-16.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-16%402x.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-256.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-256%402x.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-32.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-32%402x.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-512.png" />
+ <ImageAsset Include="Assets.xcassets\AppIcons.appiconset\AppIcon-512%402x.png" />
+ <ImageAsset Include="Assets.xcassets\Contents.json" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Resources\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Info.plist" />
+ <None Include="Entitlements.plist" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="AppDelegate.cs" />
+ <Compile Include="NativeServices.cs" />
+ <Compile Include="BrokenNativeControl.cs" />
+ <Compile Include="CustomRenderers.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Xamarin.Forms.Controls\Xamarin.Forms.Controls.csproj">
+ <Project>{CB9C96CE-125C-4A68-B6A1-C3FF1FBF93E1}</Project>
+ <Name>Xamarin.Forms.Controls</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj">
+ <Project>{57B8B73D-C3B5-4C42-869E-7B2F17D354AC}</Project>
+ <Name>Xamarin.Forms.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Maps\Xamarin.Forms.Maps.csproj">
+ <Project>{7D13BAC2-C6A4-416A-B07E-C169B199E52B}</Project>
+ <Name>Xamarin.Forms.Maps</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Platform\Xamarin.Forms.Platform.csproj">
+ <Project>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</Project>
+ <Name>Xamarin.Forms.Platform</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Platform.MacOS\Xamarin.Forms.Platform.MacOS.csproj">
+ <Project>{C0059C45-EA1E-42F3-8A0E-794BB547EC3C}</Project>
+ <Name>Xamarin.Forms.Platform.macOS</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Xaml\Xamarin.Forms.Xaml.csproj">
+ <Project>{9DB2F292-8034-4E06-89AD-98BBDA4306B9}</Project>
+ <Name>Xamarin.Forms.Xaml</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Xamarin.Forms.Maps.MacOS\Xamarin.Forms.Maps.MacOS.csproj">
+ <Project>{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}</Project>
+ <Name>Xamarin.Forms.Maps.macOS</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\about.png">
+ <Link>Resources\about.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\about%402x.png">
+ <Link>Resources\about%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\blog.png">
+ <Link>Resources\blog.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\blog%402x.png">
+ <Link>Resources\blog%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\facebook.png">
+ <Link>Resources\facebook.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\facebook%402x.png">
+ <Link>Resources\facebook%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\favorite.png">
+ <Link>Resources\favorite.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\googleplus.png">
+ <Link>Resources\googleplus.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\googleplus%402x.png">
+ <Link>Resources\googleplus%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\hm_full.jpg">
+ <Link>Resources\hm_full.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\hm.png">
+ <Link>Resources\hm.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\hm%402x.png">
+ <Link>Resources\hm%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\home.png">
+ <Link>Resources\home.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_pause.png">
+ <Link>Resources\ic_pause.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_pause%402x.png">
+ <Link>Resources\ic_pause%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_play.png">
+ <Link>Resources\ic_play.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_play%402x.png">
+ <Link>Resources\ic_play%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_share.png">
+ <Link>Resources\ic_share.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_share%402x.png">
+ <Link>Resources\ic_share%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_stop.png">
+ <Link>Resources\ic_stop.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ic_stop%402x.png">
+ <Link>Resources\ic_stop%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon-60%402x.png">
+ <Link>Resources\Icon-60%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon-Small-40%402x.png">
+ <Link>Resources\Icon-Small-40%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon-Small.png">
+ <Link>Resources\Icon-Small.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon-Small%402x.png">
+ <Link>Resources\Icon-Small%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon.png">
+ <Link>Resources\Icon.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\Icon%402x.png">
+ <Link>Resources\Icon%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\instagram.png">
+ <Link>Resources\instagram.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\instagram%402x.png">
+ <Link>Resources\instagram%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\lists.png">
+ <Link>Resources\lists.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\messages.png">
+ <Link>Resources\messages.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\notifications.png">
+ <Link>Resources\notifications.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\profile.png">
+ <Link>Resources\profile.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ratchet_full.jpg">
+ <Link>Resources\ratchet_full.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ratchet.png">
+ <Link>Resources\ratchet.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\ratchet%402x.png">
+ <Link>Resources\ratchet%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\refresh.png">
+ <Link>Resources\refresh.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\refresh%402x.png">
+ <Link>Resources\refresh%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\reply.png">
+ <Link>Resources\reply.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\retweet.png">
+ <Link>Resources\retweet.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\rui.jpg">
+ <Link>Resources\rui.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\scott.png">
+ <Link>Resources\scott.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\scott159.png">
+ <Link>Resources\scott159.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\search.png">
+ <Link>Resources\search.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\slideout.png">
+ <Link>Resources\slideout.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\slideout%402x.png">
+ <Link>Resources\slideout%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\tdl_full.jpg">
+ <Link>Resources\tdl_full.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\tdl.png">
+ <Link>Resources\tdl.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\tdl%402x.png">
+ <Link>Resources\tdl%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\tweet.png">
+ <Link>Resources\tweet.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\twitter.png">
+ <Link>Resources\twitter.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\twitter%402x.png">
+ <Link>Resources\twitter%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\twitternav.png">
+ <Link>Resources\twitternav.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\twitternav%402x.png">
+ <Link>Resources\twitternav%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Resources\xamarinlogo.png">
+ <Link>Resources\xamarinlogo.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\bank.png">
+ <Link>Resources\bank.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\bank%402x.png">
+ <Link>Resources\bank%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\calculator.png">
+ <Link>Resources\calculator.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\calculator%402x.png">
+ <Link>Resources\calculator%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\coffee%402x.png">
+ <Link>Resources\coffee%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\cover1.jpg">
+ <Link>Resources\cover1.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\cover1small.jpg">
+ <Link>Resources\cover1small.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\crimson.jpg">
+ <Link>Resources\crimson.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\crimsonsmall.jpg">
+ <Link>Resources\crimsonsmall.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Default-568h%402x.png">
+ <Link>Resources\Default-568h%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Default-667h%402x.png">
+ <Link>Resources\Default-667h%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Goobuntu-icon.png">
+ <Link>Resources\Goobuntu-icon.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Intranet-icon.png">
+ <Link>Resources\Intranet-icon.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\local.html">
+ <Link>Resources\local.html</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\menuIcon.png">
+ <Link>Resources\menuIcon.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\menuIcon%402x.png">
+ <Link>Resources\menuIcon%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\move_slider_one_right_ios6_iphone.base64">
+ <Link>Resources\move_slider_one_right_ios6_iphone.base64</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\move_slider_three_right_ios6_iphone.base64">
+ <Link>Resources\move_slider_three_right_ios6_iphone.base64</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\move_slider_two_right_ios6_iphone.base64">
+ <Link>Resources\move_slider_two_right_ios6_iphone.base64</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\oasis.jpg">
+ <Link>Resources\oasis.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\oasissmall.jpg">
+ <Link>Resources\oasissmall.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\photo.jpg">
+ <Link>Resources\photo.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\seth.png">
+ <Link>Resources\seth.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\seth%402x.png">
+ <Link>Resources\seth%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\settings%402x.png">
+ <Link>Resources\settings%402x.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\test.jpg">
+ <Link>Resources\test.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\toolbar_close.png">
+ <Link>Resources\toolbar_close.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\coffee.png">
+ <Link>Resources\coffee.png</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\FlowerBuds.jpg">
+ <Link>Images\FlowerBuds.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\FlowerBuds%402x.jpg">
+ <Link>Images\FlowerBuds%402x.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Fruits.jpg">
+ <Link>Images\Fruits.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Fruits%402x.jpg">
+ <Link>Images\Fruits%402x.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Legumes.jpg">
+ <Link>Images\Legumes.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Legumes%402x.jpg">
+ <Link>Images\Legumes%402x.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Vegetables.jpg">
+ <Link>Images\Vegetables.jpg</Link>
+ </BundleResource>
+ <BundleResource Include="..\Xamarin.Forms.ControlGallery.iOS\Images\Vegetables%402x.jpg">
+ <Link>Images\Vegetables%402x.jpg</Link>
+ </BundleResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
+</Project> \ No newline at end of file