示例#1
0
        public int Compare(TreeNode x, TreeNode y)
        {
            ExampleInfo x_info = x.Tag as ExampleInfo;
            ExampleInfo y_info = y.Tag as ExampleInfo;

            if (x_info == null || y_info == null)
            {
                return(x.Text.CompareTo(y.Text));
            }
            else
            {
                int result = x_info.Attribute.Category.CompareTo(y_info.Attribute.Category);
                if (result == 0)
                {
                    result = x_info.Attribute.Subcategory.CompareTo(y_info.Attribute.Subcategory);
                }
                if (result == 0)
                {
                    result = x_info.Attribute.Difficulty.CompareTo(y_info.Attribute.Difficulty);
                }
                if (result == 0)
                {
                    result = x_info.Attribute.Title.CompareTo(y_info.Attribute.Title);
                }

                return(result);
            }
        }
示例#2
0
            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                ExampleInfo      info           = owner.Examples [indexPath.Row];
                UIViewController viewController = info.CreateViewController();

                owner.NavigationController.PushViewController(viewController, true);
            }
示例#3
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                ExampleInfo     info = owner.Examples [indexPath.Row];
                UITableViewCell cell = tableView.DequeueReusableCell("cell");

                cell.TextLabel.Text = info.Title;
                cell.SelectionStyle = UITableViewCellSelectionStyle.None;
                return(cell);
            }
示例#4
0
        private void treeViewSamples_AfterSelect(object sender, TreeViewEventArgs e)
        {
            const string no_docs   = "Documentation has not been entered.";
            const string no_source = "Source code has not been entered.";

            if (SourcePath != null && e.Node.Tag != null &&
                !String.IsNullOrEmpty(((ExampleInfo)e.Node.Tag).Attribute.Documentation))
            {
                string docs   = null;
                string source = null;

                ExampleInfo einfo       = (ExampleInfo)e.Node.Tag;
                string      sample      = einfo.Attribute.Documentation;
                string      category    = einfo.Attribute.Category.ToString();
                string      subcategory = einfo.Attribute.Subcategory;

                string path       = Path.Combine(Path.Combine(Path.Combine(SourcePath, category), subcategory), sample);
                string sample_rtf = Path.ChangeExtension(path, "rtf");
                string sample_cs  = Path.ChangeExtension(path, "cs");

                if (File.Exists(sample_rtf))
                {
                    docs = File.ReadAllText(sample_rtf);
                }

                if (File.Exists(sample_cs))
                {
                    source = File.ReadAllText(sample_cs);
                }

                if (String.IsNullOrEmpty(docs))
                {
                    richTextBoxDescription.Text = String.Format("File {0} not found.", sample_rtf);
                }
                else
                {
                    richTextBoxDescription.Rtf = docs;
                }

                if (String.IsNullOrEmpty(source))
                {
                    richTextBoxSource.Text = String.Format("File {0} not found.", sample_cs);
                }
                else
                {
                    richTextBoxSource.Text = source;
                }
            }
            else
            {
                richTextBoxDescription.Text = no_docs;
                richTextBoxSource.Text      = no_source;
            }
        }
示例#5
0
        void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
            {
                return;
            }

            MethodInfo main =
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) ??
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] {
                typeof(object),
                typeof(object)
            }, null);

            if (main != null)
            {
                try
                {
                    if (parent != null)
                    {
                        parent.Visible = false;
                        Application.DoEvents();
                    }
                    Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                    Trace.WriteLine(String.Empty);

                    AppDomain sandbox = AppDomain.CreateDomain("Sandbox");
                    sandbox.DomainUnload += HandleSandboxDomainUnload;

                    SampleRunner           runner = new SampleRunner(main);
                    CrossAppDomainDelegate cross  = new CrossAppDomainDelegate(runner.Invoke);
                    sandbox.DoCallBack(cross);
                    AppDomain.Unload(sandbox);
                }
                finally
                {
                    if (parent != null)
                    {
                        textBoxOutput.Text = File.ReadAllText("debug.log");
                        parent.Visible     = true;
                        Application.DoEvents();
                    }
                }
            }
            else
            {
                MessageBox.Show("The selected example does not define a Main method", "Entry point not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#6
0
        void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
            {
                return;
            }

            try
            {
                if (parent != null)
                {
                    parent.Visible = false;
                    Application.DoEvents();
                }
                Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                Trace.WriteLine(String.Empty);

                var info = new ProcessStartInfo
                {
                    FileName  = Application.ExecutablePath,//.Replace("vshost.exe", String.Empty),
                    Arguments = e.Example.ToString()
                };
                var process = Process.Start(info);
                process.WaitForExit();
            }
            finally
            {
                if (parent != null)
                {
                    try
                    {
                        textBoxOutput.Text = File.ReadAllText("debug.log");
                    }
                    catch (Exception ex)
                    {
                        Debug.Print(ex.ToString());
                    }
                    parent.Visible = true;
                    parent.Focus();
                    Application.DoEvents();
                }
            }
        }
示例#7
0
        static void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
                return;

            MethodInfo main =
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) ??
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] { typeof(object), typeof(object) }, null);
            if (main != null)
            {
                try
                {
                    if (parent != null)
                    {
                        parent.Visible = false;
                        Application.DoEvents();
                    }
                    Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                    Trace.WriteLine(String.Empty);

                    Thread thread = new Thread((ThreadStart)delegate
                    {
                        try
                        {
                            main.Invoke(null, null);
                        }
                        catch (TargetInvocationException expt)
                        {
                            string ex_info;
                            if (expt.InnerException != null)
                                ex_info = expt.InnerException.ToString();
                            else
                                ex_info = expt.ToString();
                            MessageBox.Show(ex_info, "An OpenTK example encountered an error.", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                            Debug.Print(expt.ToString());
                        }
                        catch (NullReferenceException expt)
                        {
                            MessageBox.Show(expt.ToString(), "The Example launcher failed to load the example.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    });
                    thread.IsBackground = true;
                    thread.Start();
                    thread.Join();
                }
                finally
                {
                    if (parent != null)
                    {
                        parent.Visible = true;
                        Application.DoEvents();
                    }
                }
            }
            else
            {
                MessageBox.Show("The selected example does not define a Main method", "Entry point not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            if (this.Examples == null) {
                ExampleInfo[] examples = new ExampleInfo[] {

                    new ExampleInfo("Alert", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(AlertGettingStarted)),
                        new ExampleInfo("Notifications", typeof(AlertNotifications)),
                        new ExampleInfo("Animations", typeof(AlertAnimations)),
                        new ExampleInfo("Custom View", typeof(AlertCustomView)),
                        new ExampleInfo("Customize", typeof(AlertViewCustomize)),
                        new ExampleInfo("Settings", typeof(AlertSettings)),
                    }),

                    new ExampleInfo("AppFeedback", typeof(FeedbackExampleController)),

                    new ExampleInfo("AutoCompleteTextView (Beta)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(AutoCompleteGettingStarted)),
                        new ExampleInfo("Customization", typeof(AutoCompleteCustomize)),
                        new ExampleInfo("Tokens", typeof(AutoCompleteTokens)),
                    }),

                    new ExampleInfo("Calendar", new ExampleInfo[] {
                        new ExampleInfo("Calendar with events", typeof(CalendarWithEvents)),
                        new ExampleInfo("Transition Effects", typeof(CalendarTransitionEffects)),
                        new ExampleInfo("Selection", typeof(CalendarSelection)),
                        new ExampleInfo("iOS 7 style calendar", typeof(iOS7StyleCalendar)),
                        new ExampleInfo("View modes", typeof(CalendarViewModes)),
                        new ExampleInfo("Customization", typeof(CalendarCustomization)),
                        new ExampleInfo("EventKit data binding", typeof(CalendarEventKitDataBinding)),
                        new ExampleInfo("Localized calendar", typeof(LocalizedCalendar)),
                        new ExampleInfo("Inline events", typeof(InlineEvents)),
                    }),

                    new ExampleInfo("Chart", new ExampleInfo[] {

                        new ExampleInfo("Chart Types", new ExampleInfo[] {
                            new ExampleInfo("Column / Bar chart", typeof(ColumnAndBarChart)),
                            new ExampleInfo("Range Column / Bar chart", typeof(RangeColumnBarChart)),
                            new ExampleInfo("Line / Area / Spline chart", typeof(LineAreaSpline)),
                            new ExampleInfo("Scatter chart", typeof(ScatterChart)),
                            new ExampleInfo("Bubble chart", typeof(BubbleChart)),
                            new ExampleInfo("Pie chart", typeof(PieDonut)),
                            new ExampleInfo("Stacked Column chart", typeof(StackedColumnChart)),
                            new ExampleInfo("Stacked Area chart", typeof(StackedAreaChart)),
                            new ExampleInfo("Financial chart", typeof(FinancialChart)),
                            new ExampleInfo("Indicators", typeof(IndicatorsChart)),
                        }),

                        new ExampleInfo("Axis Types", new ExampleInfo[] {
                            new ExampleInfo("Numeric axis", typeof(NumericAxis)),
                            new ExampleInfo("Categorical axis", typeof(CategoricalAxis)),
                            new ExampleInfo("Date/Time axis", typeof(DateTimeAxis)),
                            new ExampleInfo("Date/Time category axis", typeof(DateTimeCategoryAxis)),
                            new ExampleInfo("Multiple axes", typeof(MultipleAxes)),
                            new ExampleInfo("Negative values", typeof(NegativeValues)),
                            new ExampleInfo("Logarithmic Axis", typeof(LogarithmicAxis)),
                            new ExampleInfo("Custom Axis", typeof(CustomAxis))
                        }),

                        new ExampleInfo("Animations", new ExampleInfo[] {
                            new ExampleInfo("Default animations", typeof(DefaultAnimation)),
                            new ExampleInfo("Custom animation - line chart", typeof(CustomAnimationLineChart)),
                            new ExampleInfo("Custom animation - area chart", typeof(CustomAnimationAreaChart)),
                            new ExampleInfo("Custom animation - pie chart", typeof(CustomAnimationPieChart)),
                            new ExampleInfo("UIKit dynamics animation", typeof(UIKitDynamicsAnimation)),
                        }),

                        new ExampleInfo("Binding", new ExampleInfo[] {
                            new ExampleInfo("Bind with data point", typeof(BindingWithDataPoint)),
                            new ExampleInfo("Bind with custom object", typeof(BindingWithCustomObject)),
                            new ExampleInfo("Bind with delegate", typeof(BindingWithDelegate)),
                        }),

                        new ExampleInfo("Pan/Zoom", typeof(PanZoom)),
                        new ExampleInfo("Customize", typeof(Customize)),

                        new ExampleInfo("Annotations", new ExampleInfo[] {
                            new ExampleInfo("Band and line annotations", typeof(BandAndLineAnnotations)),
                            new ExampleInfo("Balloon annotation", typeof(BalloonAnnotation)),
                            new ExampleInfo("Layer annotation", typeof(LayerAnnotation)),
                            new ExampleInfo("View annotation", typeof(ViewAnnotation)),
                            new ExampleInfo("Cross line annotation", typeof(CrossLineAnnotation)),
                            new ExampleInfo("Custom annotation", typeof(CustomAnnotation)),
                            new ExampleInfo("Trackball", typeof(Trackball)),
                        }),

                        new ExampleInfo("Point Labels", new ExampleInfo[] {
                            new ExampleInfo("Point Labels", typeof(PointLabels)),
                            new ExampleInfo("Custom Point Label", typeof(CustomPointLabels)),
                            new ExampleInfo("Custom Label Render",typeof(CustomPointLabelRender))
                        }),
                        new ExampleInfo("Live data", typeof(LiveData))
                    }),

                    new ExampleInfo("DataForm (New)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(DataFormGettingStarted)),
                        new ExampleInfo("Read Only", typeof(DataFormReadOnly)),
                        new ExampleInfo("Validation", typeof(DataFormValidation)),
                        new ExampleInfo("Customization", typeof(DataFormCustomization)),
                        new ExampleInfo("Collapsable Groups", typeof(DataFormCollapsibleGroups)),
                        new ExampleInfo("Alignment", typeof(DataFormAlignment))
                    }),

                    new ExampleInfo("DataSource", new ExampleInfo[] {
                        new ExampleInfo("Getting started", typeof(DataSourceGettingStarted)),
                        new ExampleInfo("Descriptors API", typeof(DataSourceDescriptorsAPI)),
                        new ExampleInfo("Bind with UI controls", typeof(DataSourceUIBindings)),
                        new ExampleInfo("Consume web service", typeof(DataSourceWithWebService)),
                    }),

                    new ExampleInfo("ListView", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(ListViewGettingStarted)),
                        new ExampleInfo("Swipe cell", typeof(ListViewSwipe)),
                        new ExampleInfo("Items reorder", typeof(ListViewReorder)),
                        new ExampleInfo("Selection", typeof(ListViewSelection)),
                        new ExampleInfo("Grouping", typeof(ListViewGroups)),
                        new ExampleInfo("Layouts", typeof(ListViewLayout)),
                        new ExampleInfo("Animations", typeof(ListViewAnimations)),
                        new ExampleInfo("Load on demand", typeof(ListViewLoadOnDemand)),
                        new ExampleInfo("Pull to refresh", typeof(ListViewPullToRefresh)),
                    }),

                    new ExampleInfo("SideDrawer", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(SideDrawerGettingStarted)),
                        new ExampleInfo("Transitions", typeof(SideDrawerTransitions)),
                        new ExampleInfo("Positions", typeof(SideDrawerPositions)),
                        new ExampleInfo("Custom Content", typeof(SideDrawerCustomContent)),
                        new ExampleInfo("Custom Transition", typeof(SideDrawerCustomTransition))
                    }),
                    new ExampleInfo("Gauges (New)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(GaugesGettingStarted)),
                        new ExampleInfo("Customization", typeof(GaugeCustomization)),
                        new ExampleInfo("Interaction", typeof(GaugeInteraction)),
                        new ExampleInfo("Animations", typeof(GaugeValueAnimation)),
                        new ExampleInfo("Scales", typeof(GaugeMultipleScales)),
                        new ExampleInfo("Ranges", typeof(GaugeMultipleRanges)),
                    }),
                };
                this.Examples = examples;
                this.Title = "Examples";
            }

            this.tableView = new UITableView ();
            this.tableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.tableView.RegisterClassForCellReuse (typeof(UITableViewCell), new NSString("cell"));
            this.tableView.Frame = this.View.Bounds;
            this.tableViewDataSource = new TableViewDataSource (this);
            this.tableViewDelegate = new TableViewDelegate (this);
            this.tableView.DataSource = this.tableViewDataSource;
            this.tableView.Delegate = this.tableViewDelegate;
            this.View.AddSubview (this.tableView);
        }
示例#9
0
 public ViewController(ExampleInfo[] examples)
 {
     this.Examples = examples;
 }
示例#10
0
        static void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
            {
                return;
            }

            MethodInfo main =
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) ??
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] { typeof(object), typeof(object) }, null);

            if (main != null)
            {
                try
                {
                    if (parent != null)
                    {
                        parent.Visible = false;
                        Application.DoEvents();
                    }
                    Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                    Trace.WriteLine(String.Empty);

                    Thread thread = new Thread((ThreadStart) delegate
                    {
                        try
                        {
                            main.Invoke(null, null);
                        }
                        catch (TargetInvocationException expt)
                        {
                            string ex_info;
                            if (expt.InnerException != null)
                            {
                                ex_info = expt.InnerException.ToString();
                            }
                            else
                            {
                                ex_info = expt.ToString();
                            }
                            MessageBox.Show(ex_info, "An OpenTK example encountered an error.", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                            Debug.Print(expt.ToString());
                        }
                        catch (NullReferenceException expt)
                        {
                            MessageBox.Show(expt.ToString(), "The Example launcher failed to load the example.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    });
                    thread.IsBackground = true;
                    thread.Start();
                    thread.Join();
                }
                finally
                {
                    if (parent != null)
                    {
                        parent.Visible = true;
                        Application.DoEvents();
                    }
                }
            }
            else
            {
                MessageBox.Show("The selected example does not define a Main method", "Entry point not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#11
0
        void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
                return;

            try
            {
                if (parent != null)
                {
                    parent.Visible = false;
                    Application.DoEvents();
                }
                Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                Trace.WriteLine(String.Empty);

                var info = new ProcessStartInfo
                {
                    FileName = Application.ExecutablePath,//.Replace("vshost.exe", String.Empty),
                    Arguments = e.Example.ToString()
                };
                var process = Process.Start(info);
                process.WaitForExit();
            }
            finally
            {
                if (parent != null)
                {
                    try
                    {
                        textBoxOutput.Text = File.ReadAllText("debug.log");
                    }
                    catch (Exception ex)
                    {
                        Debug.Print(ex.ToString());
                    }
                    parent.Visible = true;
                    parent.Focus();
                    Application.DoEvents();
                }
            }

        }
示例#12
0
 public ExampleInfo(string title, ExampleInfo[] examples)
 {
     this.Title = title;
     this.Examples = examples;
 }
        void RunSample(Control parent, ExampleInfo e)
        {
            if (e == null)
                return;

            MethodInfo main =
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) ??
                e.Example.GetMethod("Main", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] {
                typeof(object),
                typeof(object)
            }, null);
            if (main != null)
            {
                try
                {
                    if (parent != null)
                    {
                        parent.Visible = false;
                        Application.DoEvents();
                    }
                    Trace.WriteLine(String.Format("Launching sample: \"{0}\"", e.Attribute.Title));
                    Trace.WriteLine(String.Empty);

                    AppDomain sandbox = AppDomain.CreateDomain("Sandbox");
                    sandbox.DomainUnload += HandleSandboxDomainUnload;

                    SampleRunner runner = new SampleRunner(main);
                    CrossAppDomainDelegate cross = new CrossAppDomainDelegate(runner.Invoke);
                    sandbox.DoCallBack(cross);
                    AppDomain.Unload(sandbox);
                }
                finally
                {
                    if (parent != null)
                    {
                        textBoxOutput.Text = File.ReadAllText("debug.log");
                        parent.Visible = true;
                        Application.DoEvents();
                    }
                }
            }
            else
            {
                MessageBox.Show("The selected example does not define a Main method", "Entry point not found", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#14
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            if (this.Examples == null)
            {
                ExampleInfo[] examples = new ExampleInfo[] {
                    new ExampleInfo("Alert", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(AlertGettingStarted)),
                        new ExampleInfo("Notifications", typeof(AlertNotifications)),
                        new ExampleInfo("Animations", typeof(AlertAnimations)),
                        new ExampleInfo("Custom View", typeof(AlertCustomView)),
                        new ExampleInfo("Customize", typeof(AlertViewCustomize)),
                        new ExampleInfo("Settings", typeof(AlertSettings)),
                    }),

                    new ExampleInfo("AppFeedback", typeof(FeedbackExampleController)),

                    new ExampleInfo("AutoCompleteTextView (Beta)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(AutoCompleteGettingStarted)),
                        new ExampleInfo("Customization", typeof(AutoCompleteCustomize)),
                        new ExampleInfo("Tokens", typeof(AutoCompleteTokens)),
                    }),

                    new ExampleInfo("Calendar", new ExampleInfo[] {
                        new ExampleInfo("Calendar with events", typeof(CalendarWithEvents)),
                        new ExampleInfo("Transition Effects", typeof(CalendarTransitionEffects)),
                        new ExampleInfo("Selection", typeof(CalendarSelection)),
                        new ExampleInfo("iOS 7 style calendar", typeof(iOS7StyleCalendar)),
                        new ExampleInfo("View modes", typeof(CalendarViewModes)),
                        new ExampleInfo("Customization", typeof(CalendarCustomization)),
                        new ExampleInfo("EventKit data binding", typeof(CalendarEventKitDataBinding)),
                        new ExampleInfo("Localized calendar", typeof(LocalizedCalendar)),
                        new ExampleInfo("Inline events", typeof(InlineEvents)),
                    }),

                    new ExampleInfo("Chart", new ExampleInfo[] {
                        new ExampleInfo("Chart Types", new ExampleInfo[] {
                            new ExampleInfo("Column / Bar chart", typeof(ColumnAndBarChart)),
                            new ExampleInfo("Range Column / Bar chart", typeof(RangeColumnBarChart)),
                            new ExampleInfo("Line / Area / Spline chart", typeof(LineAreaSpline)),
                            new ExampleInfo("Scatter chart", typeof(ScatterChart)),
                            new ExampleInfo("Bubble chart", typeof(BubbleChart)),
                            new ExampleInfo("Pie chart", typeof(PieDonut)),
                            new ExampleInfo("Stacked Column chart", typeof(StackedColumnChart)),
                            new ExampleInfo("Stacked Area chart", typeof(StackedAreaChart)),
                            new ExampleInfo("Gaps Line / Spline / Area chart", typeof(GapsLineSplineAreaChart)),
                            new ExampleInfo("Financial chart", typeof(FinancialChart)),
                            new ExampleInfo("Indicators", typeof(IndicatorsChart)),
                        }),

                        new ExampleInfo("Axis Types", new ExampleInfo[] {
                            new ExampleInfo("Numeric axis", typeof(NumericAxis)),
                            new ExampleInfo("Categorical axis", typeof(CategoricalAxis)),
                            new ExampleInfo("Date/Time axis", typeof(DateTimeAxis)),
                            new ExampleInfo("Date/Time category axis", typeof(DateTimeCategoryAxis)),
                            new ExampleInfo("Multiple axes", typeof(MultipleAxes)),
                            new ExampleInfo("Negative values", typeof(NegativeValues)),
                            new ExampleInfo("Logarithmic Axis", typeof(LogarithmicAxis)),
                            new ExampleInfo("Custom Axis", typeof(CustomAxis))
                        }),

                        new ExampleInfo("Animations", new ExampleInfo[] {
                            new ExampleInfo("Default animations", typeof(DefaultAnimation)),
                            new ExampleInfo("Custom animation - line chart", typeof(CustomAnimationLineChart)),
                            new ExampleInfo("Custom animation - area chart", typeof(CustomAnimationAreaChart)),
                            new ExampleInfo("Custom animation - pie chart", typeof(CustomAnimationPieChart)),
                            new ExampleInfo("UIKit dynamics animation", typeof(UIKitDynamicsAnimation)),
                        }),

                        new ExampleInfo("Binding", new ExampleInfo[] {
                            new ExampleInfo("Bind with data point", typeof(BindingWithDataPoint)),
                            new ExampleInfo("Bind with custom object", typeof(BindingWithCustomObject)),
                            new ExampleInfo("Bind with delegate", typeof(BindingWithDelegate)),
                        }),

                        new ExampleInfo("Pan/Zoom", typeof(PanZoom)),
                        new ExampleInfo("Customize", typeof(Customize)),

                        new ExampleInfo("Annotations", new ExampleInfo[] {
                            new ExampleInfo("Band and line annotations", typeof(BandAndLineAnnotations)),
                            new ExampleInfo("Balloon annotation", typeof(BalloonAnnotation)),
                            new ExampleInfo("Layer annotation", typeof(LayerAnnotation)),
                            new ExampleInfo("View annotation", typeof(ViewAnnotation)),
                            new ExampleInfo("Cross line annotation", typeof(CrossLineAnnotation)),
                            new ExampleInfo("Custom annotation", typeof(CustomAnnotation)),
                            new ExampleInfo("Trackball", typeof(Trackball)),
                        }),

                        new ExampleInfo("Point Labels", new ExampleInfo[] {
                            new ExampleInfo("Point Labels", typeof(PointLabels)),
                            new ExampleInfo("Custom Point Label", typeof(CustomPointLabels)),
                            new ExampleInfo("Custom Label Render", typeof(CustomPointLabelRender))
                        }),
                        new ExampleInfo("Live data", typeof(LiveData))
                    }),

                    new ExampleInfo("DataForm (New)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(DataFormGettingStarted)),
                        new ExampleInfo("Read Only", typeof(DataFormReadOnly)),
                        new ExampleInfo("Validation", typeof(DataFormValidation)),
                        new ExampleInfo("Customization", typeof(DataFormCustomization)),
                        new ExampleInfo("Collapsable Groups", typeof(DataFormCollapsibleGroups)),
                        new ExampleInfo("Alignment", typeof(DataFormAlignment)),
                        new ExampleInfo("JSON Support", typeof(DataFormJSONSupport))
                    }),

                    new ExampleInfo("DataSource", new ExampleInfo[] {
                        new ExampleInfo("Getting started", typeof(DataSourceGettingStarted)),
                        new ExampleInfo("Descriptors API", typeof(DataSourceDescriptorsAPI)),
                        new ExampleInfo("Bind with UI controls", typeof(DataSourceUIBindings)),
                        new ExampleInfo("Consume web service", typeof(DataSourceWithWebService)),
                    }),

                    new ExampleInfo("ListView", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(ListViewGettingStarted)),
                        new ExampleInfo("Swipe cell", typeof(ListViewSwipe)),
                        new ExampleInfo("Items reorder", typeof(ListViewReorder)),
                        new ExampleInfo("Selection", typeof(ListViewSelection)),
                        new ExampleInfo("Grouping", typeof(ListViewGroups)),
                        new ExampleInfo("Layouts", typeof(ListViewLayout)),
                        new ExampleInfo("Animations", typeof(ListViewAnimations)),
                        new ExampleInfo("Load on demand", typeof(ListViewLoadOnDemand)),
                        new ExampleInfo("Pull to refresh", typeof(ListViewPullToRefresh)),
                    }),

                    new ExampleInfo("SideDrawer", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(SideDrawerGettingStarted)),
                        new ExampleInfo("Transitions", typeof(SideDrawerTransitions)),
                        new ExampleInfo("Positions", typeof(SideDrawerPositions)),
                        new ExampleInfo("Custom Content", typeof(SideDrawerCustomContent)),
                        new ExampleInfo("Custom Transition", typeof(SideDrawerCustomTransition)),
                        new ExampleInfo("Multiple SideDrawers", typeof(MultipleSideDrawers))
                    }),

                    new ExampleInfo("Gauges (New)", new ExampleInfo[] {
                        new ExampleInfo("Getting Started", typeof(GaugesGettingStarted)),
                        new ExampleInfo("Customization", typeof(GaugeCustomization)),
                        new ExampleInfo("Interaction", typeof(GaugeInteraction)),
                        new ExampleInfo("Animations", typeof(GaugeValueAnimation)),
                        new ExampleInfo("Scales", typeof(GaugeMultipleScales)),
                        new ExampleInfo("Ranges", typeof(GaugeMultipleRanges)),
                    }),
                };
                this.Examples = examples;
                this.Title    = "Examples";
            }

            this.tableView = new UITableView();
            this.tableView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            this.tableView.RegisterClassForCellReuse(typeof(UITableViewCell), new NSString("cell"));
            this.tableView.Frame      = this.View.Bounds;
            this.tableViewDataSource  = new TableViewDataSource(this);
            this.tableViewDelegate    = new TableViewDelegate(this);
            this.tableView.DataSource = this.tableViewDataSource;
            this.tableView.Delegate   = this.tableViewDelegate;
            this.View.AddSubview(this.tableView);
        }