* [MacOS] Cleanup
* [Controls] Add Header support to ListView
* [MacOS] NSView reuse on NSTableView
* [MacOS] Some fix on layour order
* [MacOS] Add CarouselPageRenderer
* [MacOS] Implement EventTracker on PageRenderer
* [MacOS] Cleanup CarouselPageRenderer
* [MacOS] Add MasterDetailPage renderer
* [MacOS] MDP renderer don't allow drag of splitter
* [MacOS] Add TabbedPage renderer
* [MacOS] Initial sketch of NavigationPageRenderer
* [MacOS] Send disappearing of CurrentPage on Dispose on NavigationPageRenderer
* [MacOS] Add Gallery page for Mac
* [MacOS] Add MacOSExpressionSearch
* [MacOS] Fix ColorExtension
* [MacOS] Fix MDP renderer layout
* [MacOS] Implement native selection on ListViewRenderer
* [MacOS] Deselect a item on NSTableView
* [MacOS] Remove previous SplitViewItems
* [MacOS] Fix navigationpage height
* [MacOS] Add toolbar for NavigationPageRenderer
* [MacOS] Don't remove selection for now (crashing)
* [MacOS] Refactor page and back button title on NavigationPageRenderer
* [MacOS] Fix bug when native navigate back
* [MacOS] Hide layer when transition
* [MacOS] ListviewRenderer fix BbackgroundColor
* [MacOS] Fix background on ScrollViewRenderer
* [MacOS] Fix header measure on ListViewRenderer
* [MacOS] Add Mac twitter demo
* [Controls] Spaces for easy reading
* [MacOS] More xaml cleanup
* [Core] Add Mac as aTargetPlatform
* [MacOS] Add alerts and actionsheets
* [MacOS] Add GestureRecognizers
* [MacOS] Fix Layout issues when adding children, enable transformations
* [MacOS] Fix title on tab item, move to tabbed navigation based on segmented control
* [MacOS] Hide toolbar when not needed, this allows to work with tabbed page, cleanup
* [MacOS] Add NativeBindings and NativeViewWrapper
* [MacOS] Fix AssemblyInfo
* [MacOS] FIX NRE on SetBackgroundColor BoxView
* [MacOS] Fix NavigationPageRenderer
* [MacOS] Fix build
* [MacOS] Also update page when it resizes
* [MacOS] Add LayoutRenderer for handle items position when the bounds change.
* [MacOS] Refactor/Cleanup
* [MacOS] Add toolbar items support to NavigationPage
* [MacOS] Resize images for TabViewITems
* [MacOS] Fix TabbedPage resize issues , allow users to override some features when creating TVI
* [MacOS] Fix hide/show Navigation toolbar
* [MacOS] Redo CarouselPageRenderer with NSPageController
* [MacOS] Add support for Modal pages
* [MacOS] Refactor navigation from platform
* [Nuget] Add nuget for MacOS
* [Nuget]Fix nuspec
* [Nuget] Add variables for CI
* [Controls] Remove MainMenu from MacOS
* [MacOS] Add TableView renderer (no headers yet)
* [MacOS] Refactoring, marking extensions as internal
* [MacOS] Add group headers for TableViewRenderer
* [MacOS] Workaround for updates on listview collection
* [MacOS] Handle updates of rows in the ListViewRenderer properly
* [MacOS] Fix navigation animation
* Fix navigation header issues with modal pages
* [MacOS] Fix MDP issues with resizing
* [MacOS] Fix general dispose
* [MacOS] Add a ViewControllerWrapper for NSSplitView
* [MacOS] MDP renderer fix animation
* [MacOS] Fix ListView selection bug
* [MacOS] Fix rendering MDP Layout inside wrappers
* [MacOS] Re write the MainToolbar handler
* [MacOS] Don't use Sierra new extensions so we can run in stable channel
* [MacOS] Another way to hide the toolbar (smarter i think)
* [MacOS] Fix MDP bug and remove debug color
* [Controls] Add HanselForms sample
* [MacOS] Fix NRE WebviewRenderer
* [MacOS] Fix uneven rows on ListView renderer
* [MacOS] Fix NRE on load (can+t find the reason this happens)
* [MacOS] Fix uneven rows
* [MacOS] Fix header sizing on ListViewRenderer
* [Controls] More stuff on HanselForms
* [MacOS] Remove warning from ListViewRenderer
* [MacOS] Fix PageRenderer bug double init
* [MacOS] Don't calculate height if RowHeight is provided
* [Controls] More Hanselforms stuff
* [MacOS] Once again a new implementation for the NavigationBar, this time using a custom view to support BackgroundColor
* [MacOS] Fix build
* [MacOS] Refactoring AwesomeBar related controls
* Fix build
* [MacOS] NavigationBar update background and t test colors
* [MacOS] Fix when we remove navigation so it works when the NavigationRenderer wasn't removed from the parent controller like in a TabbedPage
* [MacOS] Add support for ListView grouping
* [MacOS] Fix image extension method.
* [MacOS] Add base Maps project
* [MacOS] Export MapRenderer
* [MacOS] Add pin click and geocoderbacked for Maps
* [MacOS] Add extra binding project for API not in stable.
* [MacOS] Add MacOS Maps lib
* [MacOS]Fix build on alpha
* [MacOS] Remove MacOS Maps extra binding
* [UITest] Basic macOS setup
* [UITest] Add MacOSApp wrapper implementation
* [MacOS] Set AutomationID
* [UITests] Add ActionSheetUITests to MacOS UITest
* [MacOS] Fix bug on Picker
* [UITests] Link basic uitest basefixture and related files
* [MacOS] Fix pickers reuse
* [UItests] Fix MacOS app path
* [UITest] Ignore UItest for appearing on macOS for now
* [UITest] Update macOS for 2.0.3
* [UITest] Refactor EnterText MacOS app
* [UITest]Fix ViewQuery on MacOS
* [UITest]Fix IsEnabled UItest on macOS
* [UITest] Implement Enter, mark some tests inconclusive fix others
* [MacOS] Implement Entry Completed event
* [UITests] Fix UITest for IsVisible, ignore ToolbarItem test for now
* [UITests] Fix ISVisible again add extra category
* [Controls] Cleanup macOS gallery
* [MacOS] Fix Assembly info
* [Docs] Fix docs
* Fix build
* [Nuget] Fix nuspec
* [Controls] Link files on MacOS
* [Core] Update Forms stack before firing a event saying page was removed, possible breaking change
* [MacOS] Implement RemovePage on NavigationPAgeRenderer
* [UItest] Ignore some , implement back on MacOS UITest app
* [MacOS] Add default back button name (needs to be translated)
* [MacOS] Fix dispose
* [UITest] Make 29257 work on MacOS
* [MacOS] Rename stuff
* [MacOS] More renaming and cleanup
* [MacOS] Share implementations for iOS
* [MacOS] Reuse more IOS extensions
* [MacOS] Reuse FontExtensions
* [MacOS] Share NativeViewWrapper related stuff
* [MAcOS] Share event args and ExportRenderer
* [MacOS] Share platform effect
* [MacOS] Fix build
* [Docs]Fixing docs
* [MacOS] Fix ViewCell reuse
* [Core] Support ListView CachingStrategy on MacOS
* [MacOS] Fix issues with TextCell and ImageCell (we can’t set null to a NSControl value)
* [MacOS] Fix MDP child sizing bug
[UITest] Query marked by id and text
* [MacOS] Comment test related with context actions
* [MacOS] Implement missing stuff on ticker
* [MacOS] Make sure VisualElemenTracker calls the ticker update
* [UITests]Ignore context actions and not possible to test
* [MacOS] Fix Grouping bug on Listview
* [MacOS] Fix selection on Listview when using grouping
* [MacOS] Update navbar when page is popped
* [MacOS] Cleanup NavigationBar
* [Controls] More info on exceptions
* [MacOS] Fix bug animation pop modal
* [MacOS] Bring back BackgroundColor of NavigationBar
* [MacOS] Fix UITest animation delay
* [MacOS] Treat warnings as errors
* [MacOS] Center title on toolbar
* [Core] Add Platform configuration specific for MacOS
* [MacOS] Implement TabbedPage platform specific to handle TabItems on NavigationPage bar
* [MacOS] Fix warning
* [MacOS] Fix bug on SearchBar color
* [MacOS]Fix build
* [MacOS] remove extra dll from maps
* [Docs] Update docs
* [MacOS]Cleanup and refactoring
* Revert "[MacOS] remove extra dll from maps"
This reverts commit
73b948937001fea3f28449a963d0b94943e07aa0.
* [MacOS] Fix wrong refactoring
* [MacOS] dix formatting
* [MacOS] Fix build
* [MacOS] Fix bug on TabbedPageRenderer no title
* [MacOS,UITest] Update packages
* [MacOS ,UITest] Add delay when tapping something, and focus with double click
* [MacOS,UITest] Ignore UITest, not possible to test with current version
* [MacOS,UITest] Ignore test that uses Frame, UITest doesn’t return it
* [MacOS] Fix bug when no title on toolbar items
* [MacOS] Remove FormsNSView
* [MacOS] Cleanup on dispose on MDP renderer
* [MacOS] Different way to test leak of MDP, need to look at this again after
* [MacOS] Update current page when source changes
* [MacOS] More cleanup
* [MacOS,UITest] Implement ClearText
* [MacOS,UITest] ClearText doesn’t work for now on MacOS uitest
* [MacOS] Make sure we show the previous page when popping a Modal
* [MacOS] Fix issue with sizing the Header and visibility, remove for now header renderer reuse
* [MacOS] Clean CustomNSTableView
* [MacOS] Share LabelRenderer with iOS
* [MacOS,UITest] Don’t try to scroll for the element
* [MacOS] Share ResourcesProvider with iOS
* [MAcoS] Share VisualElementPackager with iOS
* [MacOS] Share ViewRenderer with iOS
* [MacOS] Merge with VisualElementTracker from iOS
* [MacOS] Merge with EventTracker from iOS
* [MacOS] Merge with VisualElementRenderer of iOS
* [MacOS] Make sure we always have a layer
* [MacOS] Fix Tracker merge with iOS version
* [MacOS] Fix bug with tabbed page on modal without navigation
* [Core] Rever change on core
* [Controls] Add missing image
* [MacOS] Clear renderers before setting them MDP
* [MacOS] Update tabbedPage ContainerArea
* [Controls] Add Custom renderers tests
* [MacOS] Fix ListViewRenderer
* [MacOS,UITest] Refactoring, implement index
* [MacOS] Make sure we don’t pass null to TextField string value
* [MacOS] Support for multiple clicks in same selected item on NSTableView
* [MacOS, UITest] Fix bug on Back because of refactoring
* [MacOS,UITest] Ignore UITest because we’d-not have ScrollDownTo yet
* [MacOS] Support Focus on EntryRenderer
* [MacOS,UITest] Ignore more a couple of tests that we can’t test on UITest Desktop
* [MacOS,UITest] MacOSApp looks for StaticText fields too
* [MacOS, UITest] Fix EnterText for marked Entry
* [MacOS] Fix index bug on TablevIewDataSource
* [MacOS] Fix SelectedItem TableViewDataSource
* [Nuget] Add Mac to Maps nuspec
* [Nuget]Fix path
* [Controls] Add basic FormsGallery sample
* [macOS] Fixed Tab NSImage crash in TabbedPageRenderer (#705)
* [macOS] Fixed Tab NSImage crash in TabbedPageRenderer
* Coding Style
* Coding Style
* [MacOS] Fix previous merge with master
* [MacOS] Possible simple fix for click on views overlapping
* [UItest] Ignore this part of the test we can’t click on NSViews yet
* [MacOS] Rename to IsOnViewCell
* fix docs
* [MacOS] Cleanup, Address feedback from Samantha’s review
* [MacOS] Add ContextActions
* [Controls] Remove FormsGalery for now
* [Docs] Update docs
* [MacOS] Implement ContextActions
* [MacOS,UITests] Enable and support UITests of ContextActions
--- /dev/null
+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;
+ }
+ }
+ }
+}
+
--- /dev/null
+{
+ "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
--- /dev/null
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
--- /dev/null
+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);
+ }
+ }
+}
--- /dev/null
+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;
+ }
+ }
+
+}
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+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);
+ }
+ }
+}
--- /dev/null
+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");
+ }
+ }
+}
+
--- /dev/null
+<?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
<BundleResource Include="Resources\twitternav.png" />
<BundleResource Include="Resources\twitternav%402x.png" />
<BundleResource Include="Resources\xamarinlogo.png" />
+ <BundleResource Include="coffee.png" />
</ItemGroup>
<ItemGroup>
<Reference Include="AdvancedColorPicker">
RunningApp.Screenshot ("At page one");
RunningApp.WaitForElement (q => q.Marked ("PageOneButtonId"));
RunningApp.Tap (q => q.Marked ("PageOneButtonId"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("PageTwoId"));
RunningApp.Screenshot ("At page two - I didn't crash");
RunningApp.WaitForElement (q => q.Marked ("PageTwoButtonId"));
RunningApp.Tap (q => q.Marked ("PageTwoButtonId"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("PageThreeId"));
RunningApp.Screenshot ("At page three - I didn't crash");
#if UITEST
[Test]
- public void TestCellsShowAfterRefresh ()
+ public void TestCellsShowAfterRefresh()
{
RunningApp.Tap (q => q.Marked ("Refresh"));
#if UITEST
[Test]
+#if __MACOS__
+ [Ignore("Webview query is not implemented yet on UITEst desktop")]
+#endif
public void Bugzilla26993Test ()
{
RunningApp.Screenshot ("I am at BZ26993");
public void Bugzilla29257Test ()
{
RunningApp.Tap (q => q.Marked ("Page 1"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("This is page 1"));
RunningApp.Back ();
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.Tap (q => q.Marked ("Page 2"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("This is page 2"));
RunningApp.Back ();
RunningApp.Tap (q => q.Marked ("Page 3"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("This is page 3"));
RunningApp.Back ();
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.Tap (q => q.Marked ("Page 4"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("This is page 4"));
RunningApp.Back ();
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.Tap (q => q.Marked ("Page 5"));
+#if __MACOS__
+ System.Threading.Thread.Sleep(2000);
+#endif
RunningApp.WaitForElement (q => q.Marked ("This is page 5"));
}
#endif
namespace Xamarin.Forms.Controls.Issues
{
- [Preserve (AllMembers = true)]
- [Issue (IssueTracker.Bugzilla, 30353, "MasterDetailPage.IsPresentedChanged is not raised")]
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 30353, "MasterDetailPage.IsPresentedChanged is not raised")]
public class Bugzilla30353 : TestMasterDetailPage
{
- protected override void Init ()
+ protected override void Init()
{
- var lbl = new Label {
+ var lbl = new Label
+ {
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
Text = "Detail"
};
- #if !UITEST
- if (App.IOSVersion == 7) {
+#if !UITEST
+ if (App.IOSVersion == 7 || Device.RuntimePlatform == Device.macOS)
+ {
lbl.Text = "Don't run";
}
- #endif
+#endif
- var lblMaster = new Label {
+ var lblMaster = new Label
+ {
HorizontalOptions = LayoutOptions.CenterAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
Text = "Master"
};
- var btn = new Button () {
+ var btn = new Button()
+ {
Text = "Toggle"
};
- var btn1 = new Button () {
+ var btn1 = new Button()
+ {
Text = "Toggle"
};
btn.Clicked += (object sender, EventArgs e) => IsPresented = !IsPresented;
btn1.Clicked += (object sender, EventArgs e) => IsPresented = !IsPresented;
- var stacklayout = new StackLayout ();
- stacklayout.Children.Add (lbl);
- stacklayout.Children.Add (btn);
+ var stacklayout = new StackLayout();
+ stacklayout.Children.Add(lbl);
+ stacklayout.Children.Add(btn);
- var stacklayout1 = new StackLayout ();
- stacklayout1.Children.Add (lblMaster);
- stacklayout1.Children.Add (btn1);
+ var stacklayout1 = new StackLayout();
+ stacklayout1.Children.Add(lblMaster);
+ stacklayout1.Children.Add(btn1);
- Master = new ContentPage {
+ Master = new ContentPage
+ {
Title = "IsPresentedChanged Test",
BackgroundColor = Color.Green,
Content = stacklayout1
};
- Detail = new ContentPage {
+ Detail = new ContentPage
+ {
BackgroundColor = Color.Gray,
Content = stacklayout
};
MasterBehavior = MasterBehavior.Popover;
IsPresentedChanged += (s, e) =>
- lblMaster.Text = lbl.Text = string.Format ("The Master is now {0}", IsPresented ? "visible" : "invisible");
+ lblMaster.Text = lbl.Text = string.Format("The Master is now {0}", IsPresented ? "visible" : "invisible");
}
- #if UITEST
+#if UITEST
[Test]
public void Bugzilla30353Test ()
{
}
}
- #if UITEST
+#if UITEST
[Test]
public void Bugzilla31330Test ()
{
#if UITEST
[Test]
+#if __MACOS__
+ [Ignore("EnterText on UITest.Desktop not implemented")]
+#endif
[UiTest (typeof(NavigationPage))]
public void Issue31333FocusEntryInListViewCell ()
{
}
[Test]
+#if __MACOS__
+ [Ignore("EnterText on UITest.Desktop not implemented")]
+#endif
[UiTest (typeof(NavigationPage))]
public void Issue31333FocusEditorInListViewCell ()
{
[Test]
+#if __MACOS__
+ [Ignore("EnterText on UITest.Desktop not implemented")]
+#endif
[UiTest (typeof(NavigationPage))]
public void Issue31333FocusEntryInTableViewCell ()
{
}
[Test]
+#if __MACOS__
+ [Ignore("EnterText on UITest.Desktop not implemented")]
+#endif
[UiTest (typeof(NavigationPage))]
public void Issue31333FocusEditorInTableViewCell ()
{
#if UITEST
[Test]
+#if __MACOS__
+ [Ignore("Missing UITest for focus")]
+#endif
public void EntryTextDoesNotDisplayNonnumericInput ()
{
RunningApp.WaitForElement ("Start Entry");
#if UITEST
[Test]
+#if __MACOS__
+ [Ignore("UITest.Desktop doesn't return empty NSView yet so it can't find the frame")]
+#endif
public void Bugzilla39530PanTest()
{
// Got to wait for the element to be visible to the UI test framework, otherwise we get occasional
}
[Test]
+#if __MACOS__
+ [Ignore("UITest.Desktop doesn't return empty NSView yet so it can't find the frame")]
+#endif
public void Bugzilla39530PinchTest()
{
RunningApp.PinchToZoomIn ("frame");
}
[Test]
+#if __MACOS__
+ [Ignore("UITest.Desktop doesn't return empty NSView yet so it can't find the frame")]
+#endif
public void Bugzilla39530TapTest()
{
RunningApp.WaitForElement (q => q.Marked ("frame"));
RunningApp.Tap(q => q.All().Marked(CanTouchButtonId));
RunningApp.WaitForElement(q => q.All().Text(CanTouchSuccessText));
-
+#if !__MACOS__
RunningApp.Tap(q => q.All().Marked(ListTapTarget));
RunningApp.WaitForElement(q => q.All().Text(ListTapSuccessText));
+#endif
}
#endif
RunningApp.WaitForElement("Menu - 0");
}
[Test]
+#if __MACOS__
+ [Ignore("ScrollDownTo not implemented in UITest.Desktop")]
+#endif
public void Bugzilla40704Test()
{
RunningApp.ScrollDownTo("btnCollappse", "lstMain", ScrollStrategy.Gesture, 0.8, timeout: TimeSpan.FromMinutes(2));
Debug.WriteLine($">>>>>>>> Post-GC, {_44166NavContent.Counter} {nameof(_44166NavContent)} allocated");
}
- if (_44166NavContent.Counter + _44166Detail.Counter + _44166Master.Counter + _44166MDP.Counter == 0)
+ int success = 0;
+
+ //some reason there's always 1 instance around i don't know why yet, if we were leaking it should be 8 here
+ if (Device.RuntimePlatform == Device.macOS)
+ success = 4;
+
+ if (_44166NavContent.Counter + _44166Detail.Counter + _44166Master.Counter + _44166MDP.Counter == success)
{
label.Text = "Success";
}
{
public static int Counter;
- public _44166NavContent ()
+ public _44166NavContent()
{
Interlocked.Increment(ref Counter);
Debug.WriteLine($"++++++++ {nameof(_44166NavContent)} constructor, {Counter} allocated");
};
}
- ~_44166NavContent ()
+ ~_44166NavContent()
{
Interlocked.Decrement(ref Counter);
Debug.WriteLine($"-------- {nameof(_44166NavContent)} destructor, {Counter} allocated");
RunningApp.Screenshot ("Clicked Leave");
RunningApp.WaitForElement (q => q.Marked ("Bug Repro's"));
-
+#if !__MACOS__
RunningApp.ClearText(q => q.Raw("* marked:'SearchBarGo'"));
RunningApp.EnterText(q => q.Raw("* marked:'SearchBarGo'"), "G198");
-
+#endif
RunningApp.Tap (q => q.Marked ("SearchButton"));
RunningApp.Screenshot ("Navigate into gallery again");
RunningApp.Screenshot ("All elements exist");
+#if !__MACOS__
var scrollRect = RunningApp.Query (q => q.Raw ("* index:0"))[0].Rect;
Xamarin.Forms.Core.UITests.Gestures.ScrollForElement (RunningApp, "* marked:'9'", new Xamarin.Forms.Core.UITests.Drag (scrollRect, Xamarin.Forms.Core.UITests.Drag.Direction.BottomToTop, Xamarin.Forms.Core.UITests.Drag.DragLength.Long));
RunningApp.Screenshot ("I see 9");
+#endif
RunningApp.Tap (q => q.Marked ("9"));
RunningApp.WaitForNoElement (q => q.Marked ("9"));
#if UITEST
[Test]
+#if __MACOS__
+ [Ignore("EnterText problems in UITest Desktop")]
+#endif
public void TestFocusIsOnTheEndAfterSettingText ()
{
RunningApp.Tap (c => c.Marked ("userNameEditorEmptyString"));
#if __ANDROID__
[Ignore("Appearing event is tied to virtualization in TabbedPage for Material")]
#endif
+#if __MACOS__
+ [Ignore("ScrollTo not implemented on MacOS")]
+#endif
[Issue(IssueTracker.Github, 2411, "ScrollToPosition.MakeVisible not called every time TabbedPage", PlatformAffected.Android)]
public void Issue2411ScrollToPositionMakeVisible()
{
[Test]
[Issue(IssueTracker.Github, 2411, "ScrollToPosition.End crashing in TabbedPage", PlatformAffected.Android)]
+#if __MACOS__
+ [Ignore("ScrollTo not implemented on MacOS")]
+#endif
public void Issue2411ScrollToPositionEndCrash()
{
RunningApp.Tap(q => q.Marked("Crash in ScrollToPosition.End"));
using System;
-using System.Collections.Generic;
-using System.Text;
using System.Reflection;
-
using Xamarin.Forms.CustomAttributes;
#if UITEST
namespace Xamarin.Forms.Controls
{
internal static class AppPaths
- {
- public static string ApkPath = "../../../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk";
+ {
+ public static string ApkPath = "../../../Xamarin.Forms.ControlGallery.Android/bin/Debug/AndroidControlGallery.AndroidControlGallery-Signed.apk";
+
+ public static string MacOSPath = "../../../Xamarin.Forms.ControlGallery.MacOS/bin/Debug/Xamarin.Forms.ControlGallery.MacOS.app";
+
+ // Have to continue using the old BundleId for now; Test Cloud doesn't like
+ // when you change the BundleId
+ public static string BundleId = "com.xamarin.quickui.controlgallery";
// Have to continue using the old BundleId for now; Test Cloud doesn't like
// when you change the BundleId
- public static string BundleId = "com.xamarin.quickui.controlgallery";
- }
+ public static string MacOSBundleId = "com.xamarin.xamarin-forms-controlgallery-macos";
+ }
#if UITEST
internal static class AppSetup
{
- static IApp InitializeApp ()
+ static IApp InitializeApp()
{
IApp app = null;
#if __ANDROID__
#elif __IOS__
app = InitializeiOSApp();
+
+#elif __MACOS__
+ Xamarin.UITest.Desktop.TestAgent.Start();
+ app = InitializeMacOSApp();
#endif
if (app == null)
- throw new NullReferenceException ("App was not initialized.");
+ throw new NullReferenceException("App was not initialized.");
// Wrap the app in ScreenshotConditional so it only takes screenshots if the SCREENSHOTS symbol is specified
return new ScreenshotConditionalApp(app);
}
#endif
- public static void NavigateToIssue (Type type, IApp app)
+#if __MACOS__
+ static IApp InitializeMacOSApp()
{
- var typeIssueAttribute = type.GetTypeInfo ().GetCustomAttribute <IssueAttribute> ();
+ // Running on a device
+ var configurator = new Xamarin.UITest.Desktop.CocoaAppConfigurator();
+ var app = configurator
+ //.AppBundle("/Users/rmarinho/Xamarin/Xamarin.Forms/Xamarin.Forms.ControlGallery.MacOS/bin/Debug/Xamarin.Forms.ControlGallery.MacOS.app")
+ .AppBundle(AppPaths.MacOSPath)
+ .BundleId(AppPaths.MacOSBundleId)
+ .StartApp();
+ return new Xamarin.Forms.Core.macOS.UITests.MacOSApp(app);
+ }
+#endif
+
+ public static void NavigateToIssue(Type type, IApp app)
+ {
+ var typeIssueAttribute = type.GetTypeInfo().GetCustomAttribute<IssueAttribute>();
string cellName = "";
- if (typeIssueAttribute.IssueTracker.ToString () != "None" &&
+ if (typeIssueAttribute.IssueTracker.ToString() != "None" &&
typeIssueAttribute.IssueNumber != 1461 &&
- typeIssueAttribute.IssueNumber != 342) {
- cellName = typeIssueAttribute.IssueTracker.ToString ().Substring(0, 1) + typeIssueAttribute.IssueNumber.ToString ();
- } else {
+ typeIssueAttribute.IssueNumber != 342)
+ {
+ cellName = typeIssueAttribute.IssueTracker.ToString().Substring(0, 1) + typeIssueAttribute.IssueNumber.ToString();
+ }
+ else {
cellName = typeIssueAttribute.Description;
}
int maxAttempts = 2;
int attempts = 0;
-
+
while (attempts < maxAttempts)
{
attempts += 1;
}
}
- public static IApp Setup (Type pageType = null)
+ public static IApp Setup(Type pageType = null)
{
IApp runningApp = null;
- try {
- runningApp = InitializeApp ();
- } catch (Exception e) {
- Assert.Inconclusive ($"App did not start for some reason: {e}");
+ try
+ {
+ runningApp = InitializeApp();
}
-
+ catch (Exception e)
+ {
+ Assert.Inconclusive($"App did not start for some reason: {e}");
+ }
+
if (pageType != null)
- NavigateToIssue (pageType, runningApp);
+ NavigateToIssue(pageType, runningApp);
return runningApp;
}
protected virtual bool Isolate => false;
#endif
- protected TestPage ()
+ protected TestPage()
{
#if APP
- Init ();
+ Init();
#endif
}
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
protected virtual bool Isolate => false;
#endif
- protected TestContentPage ()
+ protected TestContentPage()
{
#if APP
- Init ();
+ Init();
#endif
}
#if UITEST
[SetUp]
- public void Setup ()
+ public void Setup()
{
if (Isolate)
{
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
public abstract class TestCarouselPage : CarouselPage
protected virtual bool Isolate => false;
#endif
- protected TestCarouselPage ()
+ protected TestCarouselPage()
{
#if APP
- Init ();
+ Init();
#endif
}
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
public abstract class TestMasterDetailPage : MasterDetailPage
protected virtual bool Isolate => false;
#endif
- protected TestMasterDetailPage ()
+ protected TestMasterDetailPage()
{
#if APP
- Init ();
+ Init();
#endif
}
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
public abstract class TestNavigationPage : NavigationPage
protected virtual bool Isolate => false;
#endif
- protected TestNavigationPage ()
+ protected TestNavigationPage()
{
#if APP
- Init ();
+ Init();
#endif
}
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
public abstract class TestTabbedPage : TabbedPage
protected virtual bool Isolate => false;
#endif
- protected TestTabbedPage ()
+ protected TestTabbedPage()
{
#if APP
- Init ();
+ Init();
#endif
}
}
#endif
- protected abstract void Init ();
+ protected abstract void Init();
}
}
}
- while (true) {
+ while (true)
+ {
+#if __MACOS__
+ var result = App.Query(o => o.Raw(ViewQuery));
+#else
var result = App.Query (o => o.Raw(ContainerQuery));
- if (result.Any ())
+#endif
+
+ if (result.Any())
break;
- App.Tap (o => o.Raw ("* marked:'MoveNextButton'"));
+ App.Tap(o => o.Raw("* marked:'MoveNextButton'"));
}
//Assert.True (App.ScrollForElement (
#if __ANDROID__
isEdgeCase = (formProperty == View.ScaleProperty);
#endif
- if (!isEdgeCase) {
- found =
- MaybeGetProperty<string> (App, query, propertyPath, out prop) ||
- MaybeGetProperty<float> (App, query, propertyPath, out prop) ||
- MaybeGetProperty<bool> (App, query, propertyPath, out prop) ||
- MaybeGetProperty<object> (App, query, propertyPath, out prop);
- }
+ if (!isEdgeCase)
+ {
+ found =
+ MaybeGetProperty<string>(App, query, propertyPath, out prop) ||
+ MaybeGetProperty<float>(App, query, propertyPath, out prop) ||
+ MaybeGetProperty<bool>(App, query, propertyPath, out prop) ||
+ MaybeGetProperty<object>(App, query, propertyPath, out prop);
+ }
+#if __MACOS__
+ if (!found)
+ {
+
+ if (formProperty == View.IsEnabledProperty)
+ {
+ var view = App.Query((arg) => arg.Raw(query)).FirstOrDefault();
+ found = view != null;
+ prop = view.Enabled;
+ }
+
+ if (formProperty == Button.TextProperty)
+ {
+ var view = App.Query((arg) => arg.Raw(query)).FirstOrDefault();
+ found = view != null;
+ prop = view.Text;
+ }
+ }
+#endif
#if __ANDROID__
if (formProperty == View.ScaleProperty) {
using NUnit.Framework;
-using Xamarin.UITest;
-using System;
-using System.Threading;
using Xamarin.UITest.Queries;
namespace Xamarin.Forms.Core.UITests
{
AppRect screenSize;
- public ActionSheetUITests ()
+ protected override void NavigateToGallery()
{
-
+ App.NavigateToGallery(GalleryQueries.ActionSheetGallery);
}
- protected override void NavigateToGallery ()
- {
- App.NavigateToGallery (GalleryQueries.ActionSheetGallery);
- }
-
- static void CheckExtras ()
+ static void CheckExtras()
{
App.WaitForElement(c => c.Marked("Extra One"));
App.WaitForElement(c => c.Marked("Extra Six"));
}
- protected override void TestSetup ()
+ protected override void TestSetup()
{
- base.TestSetup ();
- screenSize = App.Query (q => q.Marked ("ActionSheetPage"))[0].Rect;
+ base.TestSetup();
+#if !__MACOS__
+ screenSize = App.Query(q => q.Marked("ActionSheetPage"))[0].Rect;
+#endif
}
[Test]
- public void TestDisplayActionSheet ()
+ public void TestDisplayActionSheet()
{
- ScrollAndTap ("ActionSheet Extras");
- CheckExtras ();
- App.Tap (c => c.Marked ("Extra One"));
+ ScrollAndTap("ActionSheet Extras");
+ CheckExtras();
+ App.Tap(c => c.Marked("Extra One"));
}
-
+
[Test]
- public void TestDisplayActionSheetCancel ()
+ public void TestDisplayActionSheetCancel()
{
- ScrollAndTap ("ActionSheet Cancel");
+ ScrollAndTap("ActionSheet Cancel");
// iPad does not have a Cancel button for action sheet
- if (App.Query (q => q.Marked ("Cancel")).Length > 0)
- App.Tap (c => c.Marked ("Cancel"));
+ if (App.Query(q => q.Marked("Cancel")).Length > 0)
+ App.Tap(c => c.Marked("Cancel"));
else
- App.TapCoordinates (20, screenSize.Height / 2);
+ App.TapCoordinates(20, screenSize.Height / 2);
}
[Test]
- public void TestDisplayActionSheetCancelDestruction ()
+ public void TestDisplayActionSheetCancelDestruction()
{
- ScrollAndTap ("ActionSheet Cancel Destruction");
- App.WaitForNoElement (c => c.Marked ("Extra One"));
- App.WaitForElement (c => c.Marked ("Destruction"));
- if (App.Query (q => q.Marked ("Cancel")).Length > 0)
- App.Tap (c => c.Marked ("Cancel"));
+ ScrollAndTap("ActionSheet Cancel Destruction");
+ App.WaitForNoElement(c => c.Marked("Extra One"));
+ App.WaitForElement(c => c.Marked("Destruction"));
+ if (App.Query(q => q.Marked("Cancel")).Length > 0)
+ App.Tap(c => c.Marked("Cancel"));
else
- App.TapCoordinates (20, screenSize.Height / 2);
+ App.TapCoordinates(20, screenSize.Height / 2);
}
[Test]
- public void TestDisplayActionSheetCancelExtras ()
+ public void TestDisplayActionSheetCancelExtras()
{
- ScrollAndTap ("ActionSheet Cancel Extras");
- CheckExtras ();
- if (App.Query (q => q.Marked ("Cancel")).Length > 0)
- App.Tap (c => c.Marked ("Cancel"));
+ ScrollAndTap("ActionSheet Cancel Extras");
+ CheckExtras();
+ if (App.Query(q => q.Marked("Cancel")).Length > 0)
+ App.Tap(c => c.Marked("Cancel"));
else
- App.TapCoordinates (20, screenSize.Height / 2);
+ App.TapCoordinates(20, screenSize.Height / 2);
}
[Test]
- public void TestDisplayActionSheetCancelExtrasDestruction ()
+ public void TestDisplayActionSheetCancelExtrasDestruction()
{
- ScrollAndTap ("ActionSheet Cancel Destruction Extras");
- CheckExtras ();
- App.WaitForElement (c => c.Marked ("Destruction"));
- if (App.Query (q => q.Marked ("Cancel")).Length > 0)
- App.Tap (c => c.Marked ("Cancel"));
+ ScrollAndTap("ActionSheet Cancel Destruction Extras");
+ CheckExtras();
+ App.WaitForElement(c => c.Marked("Destruction"));
+ if (App.Query(q => q.Marked("Cancel")).Length > 0)
+ App.Tap(c => c.Marked("Cancel"));
else
- App.TapCoordinates (20, screenSize.Height / 2);
+ App.TapCoordinates(20, screenSize.Height / 2);
}
[Test]
- public void TestDisplayActionSheetDestruction ()
+ public void TestDisplayActionSheetDestruction()
{
- ScrollAndTap ("ActionSheet Destruction");
- App.WaitForNoElement (c => c.Marked ("Extra One"));
- App.Tap (c => c.Marked ("Destruction"));
+ ScrollAndTap("ActionSheet Destruction");
+ App.WaitForNoElement(c => c.Marked("Extra One"));
+ App.Tap(c => c.Marked("Destruction"));
}
[Test]
- public void TestDisplayActionSheetDestructionExtras ()
+ public void TestDisplayActionSheetDestructionExtras()
{
- ScrollAndTap ("ActionSheet Destruction Extras");
- CheckExtras ();
- App.Tap (c => c.Marked ("Extra One"));
+ ScrollAndTap("ActionSheet Destruction Extras");
+ CheckExtras();
+ App.Tap(c => c.Marked("Extra One"));
}
[Test]
- public void TestDisplayActionSheetTitleCancel ()
+ public void TestDisplayActionSheetTitleCancel()
{
- ScrollAndTap ("ActionSheet Title Cancel");
- App.WaitForElement (c => c.Marked ("Title"));
- if (App.Query (q => q.Marked ("Cancel")).Length > 0)
- App.Tap (c => c.Marked ("Cancel"));
+ ScrollAndTap("ActionSheet Title Cancel");
+ App.WaitForElement(c => c.Marked("Title"));
+ if (App.Query(q => q.Marked("Cancel")).Length > 0)
+ App.Tap(c => c.Marked("Cancel"));
else
- App.TapCoordinates (20, screenSize.Height / 2);
+ App.TapCoordinates(20, screenSize.Height / 2);
}
[Test]
- public void TestDisplayActionSheetTitleCancelDestruction ()
+ public void TestDisplayActionSheetTitleCancelDestruction()
{
- ScrollAndTap ("ActionSheet Title Cancel Destruction");
- App.WaitForElement (c => c.Marked ("Title"));
- App.WaitForNoElement (c => c.Marked ("Extra One"));
- App.Tap (c => c.Marked ("Destruction"));
+ ScrollAndTap("ActionSheet Title Cancel Destruction");
+ App.WaitForElement(c => c.Marked("Title"));
+ App.WaitForNoElement(c => c.Marked("Extra One"));
+ App.Tap(c => c.Marked("Destruction"));
}
[Test]
- public void TestDisplayActionSheetTitleCancelDestructionExtras ()
+ public void TestDisplayActionSheetTitleCancelDestructionExtras()
{
- ScrollAndTap ("ActionSheet Title Cancel Destruction Extras");
- App.WaitForElement (c => c.Marked ("Title"));
- CheckExtras ();
- App.Tap (c => c.Marked ("Destruction"));
+ ScrollAndTap("ActionSheet Title Cancel Destruction Extras");
+ App.WaitForElement(c => c.Marked("Title"));
+ CheckExtras();
+ App.Tap(c => c.Marked("Destruction"));
}
[Test]
- public void TestDisplayActionSheetTitleDestruction ()
+ public void TestDisplayActionSheetTitleDestruction()
{
- ScrollAndTap ("ActionSheet Title Destruction");
- App.WaitForElement (c => c.Marked ("Title"));
- App.WaitForNoElement (c => c.Marked ("Extra One"));
- App.Tap (c => c.Marked ("Destruction"));
+ ScrollAndTap("ActionSheet Title Destruction");
+ App.WaitForElement(c => c.Marked("Title"));
+ App.WaitForNoElement(c => c.Marked("Extra One"));
+ App.Tap(c => c.Marked("Destruction"));
}
[Test]
- public void TestDisplayActionSheetTitleDestructionExtras ()
+ public void TestDisplayActionSheetTitleDestructionExtras()
{
- ScrollAndTap ("ActionSheet Title Destruction Extras");
- App.WaitForElement (c => c.Marked ("Title"));
- CheckExtras ();
- App.Tap (c => c.Marked ("Destruction"));
+ ScrollAndTap("ActionSheet Title Destruction Extras");
+ App.WaitForElement(c => c.Marked("Title"));
+ CheckExtras();
+ App.Tap(c => c.Marked("Destruction"));
}
[Test]
- public void TestDisplayActionSheetTitleExtras ()
+ public void TestDisplayActionSheetTitleExtras()
{
- ScrollAndTap ("ActionSheet Title Extras");
- CheckExtras ();
- App.Tap (c => c.Marked ("Extra One"));
+ ScrollAndTap("ActionSheet Title Extras");
+ CheckExtras();
+ App.Tap(c => c.Marked("Extra One"));
}
- void ScrollAndTap(string actionSheet)
+ void ScrollAndTap(string actionSheet)
{
+#if !__MACOS__
App.ScrollForElement(string.Format("* text:'{0}'", actionSheet), new Drag(App.Query(q => q.Marked("ActionSheetPage"))[0].Rect, Drag.Direction.BottomToTop, Drag.DragLength.Long));
- App.Tap(q=>q.Raw(string.Format("* text:'{0}'", actionSheet)));
+#endif
+ App.Tap(q => q.Raw(string.Format("* text:'{0}'", actionSheet)));
}
}
[UiTest (typeof(ActivityIndicator), "IsRunning")]
public void IsRunning ()
{
- var remote = new ViewContainerRemote (App, Test.ActivityIndicator.IsRunning, PlatformViewType);
- remote.GoTo ();
-
+ var remote = new ViewContainerRemote(App, Test.ActivityIndicator.IsRunning, PlatformViewType);
+ remote.GoTo();
+#if __MACOS__
+ Assert.Inconclusive("Not tested yet");
+#else
var isRunning = remote.GetProperty<bool> (ActivityIndicator.IsRunningProperty);
Assert.IsTrue (isRunning);
+#endif
}
protected override void FixtureTeardown ()
namespace Xamarin.Forms.Core.UITests
{
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
[Category(UITestCategories.LifeCycle)]
internal class AppearingUITests : BaseTestFixture
{
using System;
using System.Threading;
using Xamarin.UITest.Queries;
+using System.Threading.Tasks;
namespace Xamarin.Forms.Core.UITests
{
[Test]
- public void Test2 ()
+ public async void Test2()
{
+ await Task.Delay(1000);
App.WaitForElement(c => c.Marked("btnTest2"));
App.Tap (c => c.Marked ("btnTest2"));
App.WaitForElement (c => c.Marked ("imgHello"));
namespace Xamarin.Forms.Core.UITests
{
[TestFixture]
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
[Category(UITestCategories.BoxView)]
internal class BoxViewUITests : _ViewUITests
{
#if __ANDROID__
var isBold = remote.GetProperty<bool> (Button.FontProperty);
Assert.True (isBold);
+#elif __MACOS__
+ Assert.Inconclusive("needs testing");
#else
var font = remote.GetProperty<Font> (Button.FontProperty);
Assert.True (font.FontAttributes.HasFlag (FontAttributes.Bold));
const string mark = "Mark";
-#if __ANDROID__
+#if __ANDROID__ || __MACOS__
[Test]
public void ContextActionsShow ()
{
}
#endif
}
-
[TestFixture]
[Category(UITestCategories.Cells)]
internal class ContextActionsTableUITests : BaseTestFixture
const string mark = "Mark";
const string cellWithNoContextActions = "I have no ContextActions";
-#if __ANDROID__
+#if __ANDROID__ || __MACOS__
[Test]
public void ContextActionsShowAndReset ()
{
namespace Xamarin.Forms.Core.UITests
{
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
[TestFixture]
[Category(UITestCategories.Frame)]
internal class FrameUITests : _ViewUITests
namespace Xamarin.Forms.Core.UITests
{
+#if __MACOS__
+ [Ignore("Not tested on the MAC")]
+#endif
[TestFixture]
[Category(UITestCategories.Cells)]
internal class CellsGalleryTests : BaseTestFixture
namespace Xamarin.Forms.Core.UITests
{
+#if __MACOS__
+ [Ignore("Not tested in MacOS yet")]
+#endif
[TestFixture]
[Category(UITestCategories.ToolbarItem)]
internal class ToolbarItemTests : BaseTestFixture
namespace Xamarin.Forms.Core.UITests
{
+ [Category("ViewBaseTests")]
internal abstract class _ViewUITests : BaseTestFixture
{
/* Under score prefixes ensure inherited properties run first in test suite */
var viewPre = remote.GetViews ();
+#if __MACOS__
+ Assert.GreaterOrEqual(viewPre.Length, 1);
+#else
Assert.AreEqual (1, viewPre.Length);
+#endif
remote.TapStateButton ();
[UiTest (typeof (VisualElement), "Opacity")]
public virtual void _Opacity ()
{
- var remote = new ViewContainerRemote (App, Test.VisualElement.Opacity, PlatformViewType);
- remote.GoTo ();
-
+ var remote = new ViewContainerRemote(App, Test.VisualElement.Opacity, PlatformViewType);
+ remote.GoTo();
+#if __MACOS__
+ Assert.Inconclusive("needs testing");
+#else
float opacity = -1f;
opacity = remote.GetProperty<float> (View.OpacityProperty);
Assert.AreEqual (0.5f, opacity);
+#endif
}
[Test]
[UiTest (typeof (VisualElement), "Scale")]
public virtual void _Scale ()
{
- var remote = new ViewContainerRemote (App, Test.VisualElement.Scale, PlatformViewType);
- remote.GoTo ();
-
- var scaleMatrix = remote.GetProperty<Matrix> (View.ScaleProperty);
- Matrix generatedMatrix = NumericExtensions.BuildScaleMatrix (0.5f);
- Assert.AreEqual (generatedMatrix, scaleMatrix);
+ var remote = new ViewContainerRemote(App, Test.VisualElement.Scale, PlatformViewType);
+ remote.GoTo();
+#if __MACOS__
+ Assert.Inconclusive("needs testing");
+#else
+ var scaleMatrix = remote.GetProperty<Matrix>(View.ScaleProperty);
+ Matrix generatedMatrix = NumericExtensions.BuildScaleMatrix(0.5f);
+ Assert.AreEqual(generatedMatrix, scaleMatrix);
+#endif
}
[Test]
using System;
-using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-using NUnit.Framework;
using Xamarin.UITest;
-using Xamarin.UITest.Android;
-using Xamarin.UITest.iOS;
using Xamarin.UITest.Queries;
using System.Text.RegularExpressions;
--- /dev/null
+using System;
+using System.IO;
+using System.Collections.Generic;
+using Xamarin.UITest;
+using Xamarin.UITest.Desktop;
+using Xamarin.UITest.Queries;
+using System.Linq;
+using System.Diagnostics;
+using System.Threading;
+using System.Drawing;
+
+namespace Xamarin.Forms.Core.macOS.UITests
+{
+ public static class MacOSAppExtensions
+ {
+ public static UITest.Queries.AppResult ToUITestResult(this UITest.Desktop.AppResult result)
+ {
+ return new UITest.Queries.AppResult
+ {
+ Id = result.Id ?? result.TestId,
+ Label = result.Label,
+ Text = result.Text ?? result.Value,
+ Enabled = result.Enabled,
+ Class = result.Class,
+ Rect = new UITest.Queries.AppRect
+ {
+ X = result.Rect.X,
+ Y = result.Rect.Y,
+ Width = result.Rect.Width,
+ Height = result.Rect.Height,
+ CenterX = result.Rect.CenterX,
+ CenterY = result.Rect.CenterY
+ }
+ };
+ }
+ }
+
+
+ public class MacOSApp : Xamarin.UITest.IApp
+ {
+ string _backButtonIdentifier = "NSBackButton";
+ static CocoaApp _cocoaApp;
+ public MacOSApp(CocoaApp app)
+ {
+ _cocoaApp = app;
+ }
+ public IDevice Device
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+ public AppPrintHelper Print
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+ public ITestServer TestServer
+ {
+ get
+ {
+ return null;
+ }
+ }
+
+ public void Back()
+ {
+ Tap(_backButtonIdentifier);
+ }
+
+ public void ClearText()
+ {
+ _cocoaApp.ClearText();
+ }
+
+ public void ClearText(string marked)
+ {
+ var textField = _cocoaApp.QueryById(marked).FirstOrDefault((arg) => arg.Class.Contains("SearchField") || arg.Class.Contains("TextField"));
+ ClearText(textField.Rect.CenterX, textField.Rect.CenterY);
+ }
+
+ public void ClearText(Func<AppQuery, AppWebQuery> query)
+ {
+
+ }
+
+ public void ClearText(Func<AppQuery, AppQuery> query)
+ {
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ if (isMarked)
+ {
+ var markedWord = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWord[0].Trim() == "*";
+ var marked = markedWord[1].Replace("'", "");
+ ClearText(marked);
+ }
+ }
+
+ public void DismissKeyboard()
+ {
+
+ }
+
+ public void DoubleTap(string marked)
+ {
+
+ }
+
+ public void DoubleTap(Func<AppQuery, AppQuery> query)
+ {
+
+ }
+
+ public void DoubleTapCoordinates(float x, float y)
+ {
+
+ }
+
+ public void DragAndDrop(string from, string to)
+ {
+
+ }
+
+ public void DragAndDrop(Func<AppQuery, AppQuery> from, Func<AppQuery, AppQuery> to)
+ {
+
+ }
+
+ public void DragCoordinates(float fromX, float fromY, float toX, float toY)
+ {
+
+ }
+
+ public void EnterText(string text)
+ {
+ var all = _cocoaApp.Query();
+ var staticText = _cocoaApp.QueryByType("StaticText");
+ var textFields = _cocoaApp.QueryByType("Textfield");
+ var textField = staticText.Union(textFields).FirstOrDefault();
+ EnterText(text, textField.Rect.CenterX, textField.Rect.CenterY);
+ }
+
+ public void EnterText(Func<AppQuery, AppWebQuery> query, string text)
+ {
+
+ }
+
+ public void EnterText(string marked, string text)
+ {
+ var textField = _cocoaApp.QueryById(marked).FirstOrDefault((arg) => arg.Class.Contains("SearchField") || arg.Class.Contains("TextField"));
+ EnterText(text, textField.Rect.CenterX, textField.Rect.CenterY);
+ }
+
+ public void EnterText(Func<AppQuery, AppQuery> query, string text)
+ {
+ string markedWord = string.Empty;
+ int indexMarked = 0;
+
+ if (ExtractInfo(query, out markedWord, out indexMarked))
+ EnterText(markedWord, indexMarked, text);
+ }
+
+ public UITest.Queries.AppResult[] Flash(string marked)
+ {
+ var resulr = new List<Xamarin.UITest.Queries.AppResult>();
+ return resulr.ToArray();
+ }
+
+ public UITest.Queries.AppResult[] Flash(Func<AppQuery, AppQuery> query = null)
+ {
+ var resulr = new List<Xamarin.UITest.Queries.AppResult>();
+ return resulr.ToArray();
+ }
+
+ public object Invoke(string methodName, object[] arguments)
+ {
+ return null;
+ }
+
+ public object Invoke(string methodName, object argument = null)
+ {
+ return null;
+ }
+
+ public void PinchToZoomIn(string marked, TimeSpan? duration = default(TimeSpan?))
+ {
+
+ }
+
+ public void PinchToZoomIn(Func<AppQuery, AppQuery> query, TimeSpan? duration = default(TimeSpan?))
+ {
+
+ }
+
+ public void PinchToZoomInCoordinates(float x, float y, TimeSpan? duration)
+ {
+
+ }
+
+ public void PinchToZoomOut(string marked, TimeSpan? duration = default(TimeSpan?))
+ {
+
+ }
+
+ public void PinchToZoomOut(Func<AppQuery, AppQuery> query, TimeSpan? duration = default(TimeSpan?))
+ {
+
+ }
+
+ public void PinchToZoomOutCoordinates(float x, float y, TimeSpan? duration)
+ {
+
+ }
+
+ public void PressEnter()
+ {
+ _cocoaApp.SendKey(13, KeyModifier.None);
+ }
+
+ public void PressVolumeDown()
+ {
+
+ }
+
+ public void PressVolumeUp()
+ {
+
+ }
+
+ public AppWebResult[] Query(Func<Xamarin.UITest.Queries.AppQuery, Xamarin.UITest.Queries.AppWebQuery> query)
+ {
+ var resulr = new List<Xamarin.UITest.Queries.AppWebResult>();
+ return resulr.ToArray();
+ }
+
+ public string[] Query(Func<Xamarin.UITest.Queries.AppQuery, Xamarin.UITest.Queries.InvokeJSAppQuery> query)
+ {
+ return new List<string>().ToArray();
+ }
+
+ public UITest.Queries.AppResult[] Query(string marked)
+ {
+ var results = new List<Xamarin.UITest.Queries.AppResult>();
+ var allResults = _cocoaApp.Query();
+ var allResultsById = _cocoaApp.QueryById(marked);
+ foreach (var result in allResultsById)
+ results.Add(result.ToUITestResult());
+ var allResultsByText = _cocoaApp.QueryByText(marked);
+ foreach (var result in allResultsByText)
+ results.Add(result.ToUITestResult());
+ return results.ToArray();
+ }
+
+ public UITest.Queries.AppResult[] Query(Func<UITest.Queries.AppQuery, UITest.Queries.AppQuery> query = null)
+ {
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+ var results = new List<Xamarin.UITest.Queries.AppResult>();
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ var isText = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\btext\b");
+ if (isMarked)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ var markedWord = markedWords[1].Remove(markedWords[1].Length - 1).Trim();
+ return Query(markedWord);
+ }
+ if (isText)
+ {
+ var textWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\btext\b:'");
+ var isAll = textWords[0].Trim() == "*";
+ var textWord = textWords[1].Remove(textWords[1].Length - 1).Trim();
+ return Query(textWord);
+ }
+ else if (queryStr.Contains("* index:0"))
+ {
+ var allREsults = _cocoaApp.Query();
+ var result = allREsults[0].Children[0];
+ results.Add(result.ToUITestResult());
+ }
+ else if (queryStr.Contains("* index:7"))
+ {
+ var allREsults = _cocoaApp.Query();
+ var result = allREsults[0].Children[0].Children[0].Children[1];
+ results.Add(result.ToUITestResult());
+ }
+
+ return results.ToArray();
+ }
+
+ public T[] Query<T>(Func<UITest.Queries.AppQuery, UITest.Queries.AppTypedSelector<T>> query)
+ {
+
+ var results = new List<T>();
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ if (isMarked)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ var markedWord = markedWords[1].Replace("'", "");
+ var ss = Query(markedWord);
+
+ }
+ else if (queryStr.Contains("* index:0"))
+ {
+
+ var allREsults = _cocoaApp.Query();
+ var result = allREsults[0].Children[0];
+ // results.Add(result.ToUITestResult());
+ }
+ else if (queryStr.Contains("* index:7"))
+ {
+ var allREsults = _cocoaApp.Query();
+ var result = allREsults[0].Children[0].Children[0].Children[1];
+ // results.Add(result.ToUITestResult());
+ }
+
+ return results.ToArray();
+ }
+
+ public void Repl()
+ {
+
+ }
+
+ public FileInfo Screenshot(string title)
+ {
+ return null;
+ }
+
+ public void ScrollDown(string withinMarked, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void ScrollDown(Func<AppQuery, AppQuery> withinQuery = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void ScrollDownTo(Func<AppQuery, AppQuery> toQuery, Func<AppQuery, AppQuery> withinQuery = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollDownTo(Func<AppQuery, AppWebQuery> toQuery, Func<AppQuery, AppQuery> withinQuery = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollDownTo(Func<AppQuery, AppWebQuery> toQuery, string withinMarked, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollDownTo(string toMarked, string withinMarked = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollTo(string toMarked, string withinMarked = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollUp(string withinMarked, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void ScrollUp(Func<AppQuery, AppQuery> query = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void ScrollUpTo(Func<AppQuery, AppWebQuery> toQuery, string withinMarked, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollUpTo(Func<AppQuery, AppQuery> toQuery, Func<AppQuery, AppQuery> withinQuery = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollUpTo(Func<AppQuery, AppWebQuery> toQuery, Func<AppQuery, AppQuery> withinQuery = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void ScrollUpTo(string toMarked, string withinMarked = null, ScrollStrategy strategy = ScrollStrategy.Auto, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true, TimeSpan? timeout = default(TimeSpan?))
+ {
+
+ }
+
+ public void SetOrientationLandscape()
+ {
+
+ }
+
+ public void SetOrientationPortrait()
+ {
+
+ }
+
+ public void SetSliderValue(Func<AppQuery, AppQuery> query, double value)
+ {
+
+ }
+
+ public void SetSliderValue(string marked, double value)
+ {
+
+ }
+
+ public void SwipeLeft()
+ {
+
+ }
+
+ public void SwipeLeftToRight(double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void SwipeLeftToRight(Func<AppQuery, AppQuery> query, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void SwipeLeftToRight(Func<AppQuery, AppWebQuery> query, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SwipeLeftToRight(string marked, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void SwipeRight()
+ {
+
+ }
+
+ public void SwipeRightToLeft(double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void SwipeRightToLeft(Func<AppQuery, AppWebQuery> query, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SwipeRightToLeft(Func<AppQuery, AppQuery> query, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void SwipeRightToLeft(string marked, double swipePercentage = 0.67, int swipeSpeed = 500, bool withInertia = true)
+ {
+
+ }
+
+ public void Tap(Func<AppQuery, AppWebQuery> query)
+ {
+
+ }
+
+ public void Tap(string marked)
+ {
+ Tap(marked, 0);
+ }
+
+ public void Tap(Func<AppQuery, AppQuery> query)
+ {
+ string markedWord = string.Empty;
+ int indexMarked = 0;
+
+ if (ExtractInfo(query, out markedWord, out indexMarked))
+ Tap(markedWord, indexMarked);
+ }
+
+ public void TapCoordinates(float x, float y)
+ {
+
+ }
+
+ public void TouchAndHold(string marked)
+ {
+ TouchAndHold(marked, 0);
+ }
+
+ void TouchAndHold(string marked, int index)
+ {
+ var safeIndex = Math.Max(index, 0);
+ var queryById = _cocoaApp.QueryById(marked.Trim())[safeIndex];
+ TouchAndHoldCoordinates(queryById.Rect.CenterX, queryById.Rect.CenterY);
+
+ }
+
+ public void TouchAndHold(Func<AppQuery, AppQuery> query)
+ {
+ string markedWord = string.Empty;
+ int indexMarked = 0;
+
+ if (ExtractInfo(query, out markedWord, out indexMarked))
+ TouchAndHold(markedWord, indexMarked);
+ }
+
+ public void TouchAndHoldCoordinates(float x, float y)
+ {
+ _cocoaApp.RightClick(x, y);
+ Thread.Sleep(1000);
+ }
+
+ public void WaitFor(Func<bool> predicate, string timeoutMessage = "Timed out waiting...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+
+ }
+
+ public AppWebResult[] WaitForElement(Func<AppQuery, AppWebQuery> query, string timeoutMessage = "Timed out waiting for element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+ var resulr = new List<Xamarin.UITest.Queries.AppWebResult>();
+ return resulr.ToArray();
+ }
+
+ public UITest.Queries.AppResult[] WaitForElement(string marked, string timeoutMessage = "Timed out waiting for element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+ var results = new List<Xamarin.UITest.Queries.AppResult>();
+
+ var queryById = _cocoaApp.QueryById(marked);
+ foreach (var res in queryById)
+ {
+ results.Add(res.ToUITestResult());
+ }
+ Stopwatch s = new Stopwatch();
+ s.Start();
+ bool foundElement = false;
+ while (s.Elapsed < timeout && !foundElement)
+ {
+ var allResultsById = _cocoaApp.QueryById(marked);
+ foreach (var res in queryById)
+ {
+ results.Add(res.ToUITestResult());
+ }
+ foundElement = results.Count > 0;
+ System.Diagnostics.Debug.WriteLine(foundElement);
+ }
+ s.Stop();
+
+ return results.ToArray();
+ }
+
+ public UITest.Queries.AppResult[] WaitForElement(Func<AppQuery, AppQuery> query, string timeoutMessage = "Timed out waiting for element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ if (isMarked)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ var markedWord = markedWords[1].Replace("'", "").Trim();
+ return WaitForElement(markedWord, timeoutMessage, timeout, retryFrequency, postTimeout);
+ }
+ return new List<Xamarin.UITest.Queries.AppResult>().ToArray();
+ }
+
+ public void WaitForNoElement(Func<AppQuery, AppWebQuery> query, string timeoutMessage = "Timed out waiting for no element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+
+
+ }
+
+ public void WaitForNoElement(string marked, string timeoutMessage = "Timed out waiting for no element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+ Stopwatch s = new Stopwatch();
+ s.Start();
+ bool noElement = false;
+ while (s.Elapsed < timeout && !noElement)
+ {
+ var allResultsById = _cocoaApp.QueryById(marked);
+ noElement = allResultsById.Length == 0;
+ System.Diagnostics.Debug.WriteLine(noElement);
+ }
+ s.Stop();
+ if (s.Elapsed < timeout && !noElement)
+ throw (new Exception(timeoutMessage));
+
+ }
+
+ public void WaitForNoElement(Func<AppQuery, AppQuery> query, string timeoutMessage = "Timed out waiting for no element...", TimeSpan? timeout = default(TimeSpan?), TimeSpan? retryFrequency = default(TimeSpan?), TimeSpan? postTimeout = default(TimeSpan?))
+ {
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ if (isMarked)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ var markedWord = markedWords[1].Replace("'", "").Trim();
+ WaitForNoElement(markedWord, timeoutMessage, timeout, retryFrequency, postTimeout);
+ }
+ }
+
+ static bool ExtractInfo(Func<AppQuery, AppQuery> query, out string markedWord, out int indexMarked)
+ {
+ indexMarked = 0;
+ markedWord = string.Empty;
+ var isSuccess = false;
+ var queryStr = query(new AppQuery(QueryPlatform.iOS)).ToString();
+ var isIndex = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bindex\b");
+ if (isIndex)
+ {
+ var indexWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bindex\b:");
+ var indexWord = indexWords[1];
+ int.TryParse(indexWord, out indexMarked);
+ queryStr = indexWords[0].Trim();
+ }
+ var isMarked = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\bmarked\b");
+ if (isMarked)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\bmarked\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ markedWord = markedWords[1].Replace("'", "").Trim();
+ isSuccess = true;
+
+ }
+ var isText = System.Text.RegularExpressions.Regex.IsMatch(queryStr, @"\btext\b");
+ if (isText)
+ {
+ var markedWords = System.Text.RegularExpressions.Regex.Split(queryStr, @"\btext\b:'");
+ var isAll = markedWords[0].Trim() == "*";
+ markedWord = markedWords[1].Replace("'", "").Trim();
+ isSuccess = true;
+ }
+ return isSuccess;
+ }
+
+ void Tap(string marked, int index)
+ {
+ var safeIndex = Math.Max(index, 0);
+ var queryById = _cocoaApp.QueryById(marked.Trim())[safeIndex];
+ _cocoaApp.Click(queryById.Rect.CenterX, queryById.Rect.CenterY);
+ Thread.Sleep(1000);
+ }
+
+ static void EnterText(string marked, int index, string text)
+ {
+ UITest.Desktop.AppResult textField = null;
+ var safeIndex = Math.Max(index, 0);
+ var textFields = _cocoaApp.QueryById(marked).Where((arg) => arg.Class.Contains("SearchField") || arg.Class.Contains("TextField"));
+ if (textFields.Count() > 0)
+ {
+ textField = textFields.ElementAt(safeIndex);
+ }
+ else
+ {
+ var markedField = _cocoaApp.QueryById(marked);
+ if (markedField.Length > 0)
+ {
+ textField = markedField[0];
+ }
+ else
+ {
+
+ var allTextFields = _cocoaApp.QueryByType("TextField");
+ textField = allTextFields[0];
+ }
+ }
+
+ if (textField != null)
+ EnterText(text, textField.Rect.CenterX, textField.Rect.CenterY);
+
+ }
+
+ static void EnterText(string text, float x, float y)
+ {
+ _cocoaApp.Click(x, y);
+ _cocoaApp.Click(x, y);
+ Thread.Sleep(500);
+ _cocoaApp.EnterText(text);
+ Thread.Sleep(500);
+ }
+
+ static void ClearText(float x, float y)
+ {
+ _cocoaApp.Click(x, y);
+ _cocoaApp.Click(x, y);
+ Thread.Sleep(500);
+ _cocoaApp.ClearText();
+ Thread.Sleep(500);
+ }
+ }
+}
--- /dev/null
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Xamarin.Forms.Core.macOS.UITests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
--- /dev/null
+<?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>{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>Xamarin.Forms.Core.macOS.UITests</RootNamespace>
+ <AssemblyName>Xamarin.Forms.Core.macOS.UITests</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;__MACOS__;UITEST</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Interfaces">
+ <HintPath>..\packages\ServiceStack.Interfaces.4.5.4\lib\portable-wp80+sl5+net45+win8+wpa81+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Text">
+ <HintPath>..\packages\ServiceStack.Text.4.5.4\lib\net45\ServiceStack.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="ServiceStack.Client">
+ <HintPath>..\packages\ServiceStack.Client.4.5.4\lib\net45\ServiceStack.Client.dll</HintPath>
+ </Reference>
+ <Reference Include="Xamarin.UITest.Desktop">
+ <HintPath>..\packages\Xamarin.UITest.Desktop.0.0.7\lib\net45\Xamarin.UITest.Desktop.dll</HintPath>
+ </Reference>
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.IO.Compression" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Numerics" />
+ <Reference Include="System.Reactive.Core" />
+ <Reference Include="System.Reactive.Interfaces" />
+ <Reference Include="System.Reactive.Linq" />
+ <Reference Include="System.Reactive.PlatformServices" />
+ <Reference Include="System.Reactive.Windows.Threading" />
+ <Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.Windows" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="nunit.framework">
+ <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="Xamarin.UITest">
+ <HintPath>..\packages\Xamarin.UITest.2.0.5\lib\Xamarin.UITest.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActionSheetUITests.cs">
+ <Link>Tests\ActionSheetUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\BaseTestFixture.cs">
+ <Link>BaseTestFixture.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\UITestCategories.cs">
+ <Link>UITestCategories.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Queries.cs">
+ <Link>Queries.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\AppExtensions.cs">
+ <Link>Utilities\AppExtensions.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\PlatformQueries.cs">
+ <Link>PlatformQueries.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Drag.cs">
+ <Link>Utilities\Drag.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Gestures.cs">
+ <Link>Utilities\Gestures.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\UITestCustomExceptions.cs">
+ <Link>Utilities\UITestCustomExceptions.cs</Link>
+ </Compile>
+ <Compile Include="MacOSApp.cs" />
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ActivityIndicatorUITests.cs">
+ <Link>Tests\ActivityIndicatorUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ViewUITests.cs">
+ <Link>Tests\ViewUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\BaseViewContainerRemote.cs">
+ <Link>Remotes\BaseViewContainerRemote.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\EventViewContainerRemote.cs">
+ <Link>Remotes\EventViewContainerRemote.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\LayeredViewContainerRemote.cs">
+ <Link>Remotes\LayeredViewContainerRemote.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\StateViewContainerRemote.cs">
+ <Link>Remotes\StateViewContainerRemote.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Remotes\ViewContainerRemote.cs">
+ <Link>Remotes\ViewContainerRemote.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ViewInspector.cs">
+ <Link>Utilities\ViewInspector.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\Logger.cs">
+ <Link>Utilities\Logger.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\NumericExtensions.cs">
+ <Link>Utilities\NumericExtensions.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Utilities\ParsingUtils.cs">
+ <Link>Utilities\ParsingUtils.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AppearingUITests.cs">
+ <Link>Tests\AppearingUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\AutomationIDUITests.cs">
+ <Link>Tests\AutomationIDUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\BoxViewUITests.cs">
+ <Link>Tests\BoxViewUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ButtonUITests.cs">
+ <Link>Tests\ButtonUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ContextActionsUITests.cs">
+ <Link>Tests\ContextActionsUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DatePickerUITests.cs">
+ <Link>Tests\DatePickerUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\DisplayAlertUITests.cs">
+ <Link>Tests\DisplayAlertUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EditorUITests.cs">
+ <Link>Tests\EditorUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\EntryUITests.cs">
+ <Link>Tests\EntryUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\FrameUITests.cs">
+ <Link>Tests\FrameUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ImageUITests.cs">
+ <Link>Tests\ImageUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\LabelUITests.cs">
+ <Link>Tests\LabelUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-CellsUITests.cs">
+ <Link>Tests\Legacy-CellsUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\Legacy-UnevenListTests.cs">
+ <Link>Tests\Legacy-UnevenListTests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\PickerUITests.cs">
+ <Link>Tests\PickerUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ProgressBarUITests.cs">
+ <Link>Tests\ProgressBarUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\RootGalleryUITests.cs">
+ <Link>Tests\RootGalleryUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ScrollViewUITests.cs">
+ <Link>Tests\ScrollViewUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SearchBarUITests.cs">
+ <Link>Tests\SearchBarUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SliderUITests.cs">
+ <Link>Tests\SliderUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\StepperUITests.cs">
+ <Link>Tests\StepperUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\SwitchUITests.cs">
+ <Link>Tests\SwitchUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\TimePickerUITests.cs">
+ <Link>Tests\TimePickerUITests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\ToolbarItemTests.cs">
+ <Link>Tests\ToolbarItemTests.cs</Link>
+ </Compile>
+ <Compile Include="..\Xamarin.Forms.Core.iOS.UITests\Tests\WebViewUITests.cs">
+ <Link>Tests\WebViewUITests.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Tests\" />
+ <Folder Include="Utilities\" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Xamarin.Forms.CustomAttributes\Xamarin.Forms.CustomAttributes.csproj">
+ <Project>{4DCD0420-1168-4B77-86DB-6196EE4BD491}</Project>
+ <Name>Xamarin.Forms.CustomAttributes</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>
+ </ItemGroup>
+ <Import Project="..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems" Label="Shared" Condition="Exists('..\Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems')" />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="..\packages\Xamarin.UITest.Desktop.0.0.7\build\Xamarin.UITest.Desktop.targets" Condition="Exists('..\packages\Xamarin.UITest.Desktop.0.0.7\build\Xamarin.UITest.Desktop.targets')" />
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
+ <package id="NUnit" version="2.6.4" targetFramework="net45" />
+ <package id="ServiceStack.Client" version="4.5.4" targetFramework="net45" />
+ <package id="ServiceStack.Interfaces" version="4.5.4" targetFramework="net45" />
+ <package id="ServiceStack.Text" version="4.5.4" targetFramework="net45" />
+ <package id="Xamarin.UITest" version="2.0.5" targetFramework="net45" />
+ <package id="Xamarin.UITest.Desktop" version="0.0.7" targetFramework="net45" />
+</packages>
\ No newline at end of file
// as much as possible to prevent creating new ones and losing more memory
// For the time being, we don't want ViewRenderer handling disposal of the MKMapView
- // if we're on iOS 10; during Dispose we'll be putting the MKMapView in a pool instead
+ // if we're on iOS 9 or 10; during Dispose we'll be putting the MKMapView in a pool instead
#if __MOBILE__
protected override bool ManageNativeControlLifetime => !FormsMaps.IsiOs9OrNewer;
#endif
-
protected override void Dispose(bool disposing)
{
if (_disposed)
}
#endif
// For iOS versions < 9, the MKMapView will be disposed in ViewRenderer's Dispose method
+
if (_locationManager != null)
{
_locationManager.Dispose();
{
var element = toolbarItems[i];
- var item = new NSToolbarItem(element.Text);
+ var item = new NSToolbarItem(element.Text ?? "");
item.Activated += (sender, e) => (element as IMenuItemController).Activate();
var button = new NSButton();
- button.Title = element.Text;
+ button.Title = element.Text ?? "";
button.SizeToFit();
var buttonWidth = itemWidth;
if (button.FittingSize.Width > itemWidth)
button.SizeToFit();
view.AddSubview(button);
- item.Label = item.PaletteLabel = item.ToolTip = button.ToolTip = element.Text;
+ item.Label = item.PaletteLabel = item.ToolTip = button.ToolTip = element.Text ?? "";
subItems[i] = item;
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.Platform.MacOS", "Xamarin.Forms.Platform.MacOS\Xamarin.Forms.Platform.MacOS.csproj", "{C0059C45-EA1E-42F3-8A0E-794BB547EC3C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.ControlGallery.MacOS", "Xamarin.Forms.ControlGallery.MacOS\Xamarin.Forms.ControlGallery.MacOS.csproj", "{8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.Maps.MacOS", "Xamarin.Forms.Maps.MacOS\Xamarin.Forms.Maps.MacOS.csproj", "{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Forms.Core.macOS.UITests", "Xamarin.Forms.Core.macOS.UITests\Xamarin.Forms.Core.macOS.UITests.csproj", "{9DB0CABB-24CC-4538-88EC-6E0A0FE40248}"
+EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Xamarin.Forms.Controls.Issues\Xamarin.Forms.Controls.Issues.Shared\Xamarin.Forms.Controls.Issues.Shared.projitems*{0a39a74b-6f7a-4d41-84f2-b0ccdce899df}*SharedItemsImports = 4
{C0059C45-EA1E-42F3-8A0E-794BB547EC3C}.Release|x64.Build.0 = Release|Any CPU
{C0059C45-EA1E-42F3-8A0E-794BB547EC3C}.Release|x86.ActiveCfg = Release|Any CPU
{C0059C45-EA1E-42F3-8A0E-794BB547EC3C}.Release|x86.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|ARM.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|Templates.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|Templates.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|x64.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Debug|x86.Build.0 = Debug|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|ARM.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|ARM.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|iPhone.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|Templates.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|Templates.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|x64.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|x64.Build.0 = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|x86.ActiveCfg = Release|Any CPU
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D}.Release|x86.Build.0 = Release|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Release|x64.Build.0 = Release|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Release|x86.ActiveCfg = Release|Any CPU
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884}.Release|x86.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|ARM.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|Templates.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|Templates.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|x64.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Debug|x86.Build.0 = Debug|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|ARM.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|ARM.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|iPhone.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|Templates.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|Templates.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x64.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x64.Build.0 = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x86.ActiveCfg = Release|Any CPU
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
{C9696465-7657-4843-872E-3C01891C4A9B} = {9AD757F5-E57A-459D-A0A7-E0675E045B84}
{392156B2-760A-4EE3-A822-CABD3238A21D} = {80BAC3FB-357A-4D05-A050-9F234DF49C97}
{C0059C45-EA1E-42F3-8A0E-794BB547EC3C} = {29AC50BF-B4FB-450B-9386-0C5AD4B84226}
+ {8D3DFCB7-DB10-40E5-ACFE-411AAA85520D} = {4F5E2D21-17F6-4A42-B8FB-D03D82E24EC8}
{C3C24A6D-2D0C-4053-9FCC-E54FF9CA1884} = {132FB9A4-613F-44CE-95D5-758D32D231DD}
+ {9DB0CABB-24CC-4538-88EC-6E0A0FE40248} = {D4D57221-71D6-4031-A6F4-EC66AF0929D9}
EndGlobalSection
EndGlobal