(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.
| public static class BindableObjectExtensions | |
| { | |
| // chainable, with a string for property | |
| // usage : new Button().WithBinding(Button.CommandProperty, "SomeCommand"), | |
| public static T WithBinding<T>(this T obj, | |
| BindableProperty bindableProperty, | |
| string path, | |
| BindingMode mode = BindingMode.Default, | |
| IValueConverter converter = null, |
| public class DummyFragment : Fragment | |
| { | |
| public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | |
| { | |
| var view = inflater.Inflate(Resource.Layout.dummy_frag, container, false); | |
| var tv = view.FindViewById<TextView>(Resource.Id.textView1); | |
| tv.Text = "" + Arguments.GetInt("number", -1); | |
| return view; | |
| } | |
| } |
| using System; | |
| using Xamarin.Forms; | |
| using System.Collections; | |
| namespace YourNamespace.Views.Controls { | |
| public class BindablePicker : Picker | |
| { | |
| public BindablePicker() | |
| { | |
| this.SelectedIndexChanged += OnSelectedIndexChanged; |
(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 System.Collections.Generic; | |
| using System.Collections.ObjectModel; | |
| using System.Collections.Specialized; | |
| using System.ComponentModel; | |
| using System.Linq; | |
| using System.Text; | |
| using Android.App; | |
| using Android.Content; | |
| using Android.OS; |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using Android.App; | |
| using Android.Content; | |
| using Android.OS; | |
| public abstract class ActivityBase : Activity { | |
| private int activityResultRegistrationCounter = 10000; |
| public class BackgroundDownload | |
| { | |
| public BackgroundDownload () | |
| { | |
| } | |
| NSUrlSessionDownloadTask downloadTask; | |
| static NSUrlSession session; | |
| public async Task DownloadFileAsync(Uri url, string destination) | |
| { | |
| if (downloadTask != null) |
| //start with DoAdd, which comes off a button push. | |
| // it does pop up one screen, then another one, which is not ideal, | |
| // but it wouldn't be hard to adapt. | |
| async void DoAdd () | |
| { | |
| var camera = await PickCameraForLoad (); | |
| if (camera != null) | |
| { |
| import android.content.res.Resources; | |
| import android.graphics.Bitmap; | |
| import android.graphics.NinePatch; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.NinePatchDrawable; | |
| import java.nio.ByteBuffer; | |
| import java.nio.ByteOrder; | |
| /** |
| declare interface AngularVersion { | |
| full: string; | |
| major: number; | |
| minor: number; | |
| dot: number; | |
| codeName: string; | |
| } | |
| declare interface AngularModule { | |
| requires: string[]; |