(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <!-- | |
| Download and copy this file to ~/Library/XamarinStudio-VERSION/Snippets | |
| In a .cs file, type "bprop" and TAB to insert the code for a bindable property | |
| --> | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <CodeTemplates version="3.0"> | |
| <CodeTemplate version="2.0"> | |
| <Header> | |
| <_Group>C#</_Group> | |
| <Version /> |
| // | |
| // Badge.cs | |
| // Created by Alexey Kinev on 19 Jan 2015. | |
| // | |
| // Licensed under The MIT License (MIT) | |
| // http://opensource.org/licenses/MIT | |
| // | |
| // Copyright (c) 2015 Alexey Kinev <[email protected]> | |
| // | |
| using System; |
| using Xamarin.Forms; | |
| using System.Reflection; | |
| using System.Runtime.CompilerServices; | |
| using Xamarin.Forms.Xaml; | |
| var xaml = @"<?xml version=""1.0"" encoding=""utf-8"" ?> | |
| <ContentPage xmlns=""http://xamarin.com/schemas/2014/forms"" | |
| xmlns:x=""http://schemas.microsoft.com/winfx/2009/xaml"" | |
| x:Class=""XamlSamples.HelloXamlPage"" | |
| Title=""Hello XAML Page"" |
| var ko = require('knockout'); | |
| ko.components.register('simple-name', require('./components/simple-name/simple-name.js')); | |
| ko.applyBindings({ userName: ko.observable() }); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| using System; | |
| using Xamarin.Forms.Xaml; | |
| using Xamarin.Forms; | |
| namespace WorkingWithImages | |
| { | |
| // You exclude the 'Extension' suffix when using in Xaml markup | |
| [ContentProperty ("Source")] | |
| public class ImageResourceExtension : IMarkupExtension | |
| { |
| #region API KEY Authentication | |
| public static class APIKeyDefaults | |
| { | |
| public const string AuthenticationType = "Apikey"; | |
| } | |
| public class APIKeyAuthenticationOptions : AuthenticationOptions | |
| { | |
| /// <summary> | |
| /// Creates an instance of API Key authentication options with default values. |
| using Android.Content; | |
| using Cirrious.MvvmCross.Binding.BindingContext; | |
| using Cirrious.MvvmCross.Binding.Droid.BindingContext; | |
| using Cirrious.MvvmCross.ViewModels; | |
| using MeetupManager.Droid.Helpers; | |
| using Cirrious.MvvmCross.Droid.Views; | |
| namespace MyProject | |
| { | |
| public abstract class MvxActionBarActivity |
| [DllImport ("/usr/lib/libobjc.dylib")] | |
| extern static IntPtr class_getInstanceMethod (IntPtr classHandle, IntPtr Selector); | |
| [DllImport ("/usr/lib/libobjc.dylib")] | |
| extern static Func<IntPtr,IntPtr,IntPtr> method_getImplementation (IntPtr method); | |
| [DllImport ("/usr/lib/libobjc.dylib")] | |
| extern static IntPtr imp_implementationWithBlock (ref BlockLiteral block); | |
| [DllImport ("/usr/lib/libobjc.dylib")] | |
| extern static void method_setImplementation (IntPtr method, IntPtr imp); | |
| static Func<IntPtr,IntPtr,IntPtr> original_impl; |
| using System; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.ObjCRuntime; | |
| using MonoTouch.UIKit; | |
| namespace NS { | |
| public static class UIViewExtensions { | |
| // returns the view and all child views with status | |
| public static string RecursiveDescription(this UIView view) |