Skip to content

Instantly share code, notes, and snippets.

👷
Working on something great!

Jon Douglas JonDouglas

👷
Working on something great!
Block or report user

Report or block JonDouglas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fe45e3250206db8dfa94
C:\Users\Jon\Documents\Visual Studio 2013\Projects\App11>msbuild App11.sln /t:Bu
ild /p:Configuration=Ad-Hoc;Platform=iPhone
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34014]
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
Build started 12/2/2014 9:58:45 AM.
Project "C:\Users\Jon\Documents\Visual Studio 2013\Projects\App11\App11.sln" on
View gist:b9fa806f40365acf3cbb
Platform Specific renderers can be found in the following namespaces:
iOS: Xamarin.Forms.Platform.iOS
Android: Xamarin.Forms.Platform.Android
Windows Phone: Xamarin.Forms.Platform.WinPhone
Base Renderer
To start with, all renders usually derive from a platform specific base renderer class that in turn inherit from a platform specific control. If you want to create platform specific renderers from scratch you are probably going to be deriving them from the correct platform's base renderer class. These have been substantially standardized in version 6201 with all controls inheriting from a generic version of ViewRenderer. There is also a non-generic version that appears to be used sometimes by navigation controls. The methods on these classes are also more in line with each other than they had been but still not the same. For example the iOS version has a method called ViewOnUnfocusRequested while the Android's version of the same method is called OnUnfocusRequested.
iOS:
View gist:df195b39029f3441b16c
<application ... >
...
<!-- The main/home activity (it has no parent activity) -->
<activity
android:name="com.example.myfirstapp.MainActivity" ...>
...
</activity>
<!-- A child of the main activity -->
<activity
android:name="com.example.myfirstapp.DisplayMessageActivity"
View gist:d1bf08dce57c814914cb
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="NewCameraBroadcast.NewCameraBroadcast" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
<application android:label="NewCameraBroadcast" android:icon="@drawable/Icon"></application>
<uses-feature android:name="android.hardware.camera"></uses-feature>
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
View gist:a4137976c051e6a88ee9
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
View gist:0eeee51e08e63bda7a46
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace NewCameraBroadcast
{
View gist:61076025de2e64ed6eea
public class ApplicationUserManager : UserManager<ApplicationUser>
{
public ApplicationUserManager(IUserStore<ApplicationUser> store)
: base(store)
{
}
public static ApplicationUserManager Create(
IdentityFactoryOptions<ApplicationUserManager> options,
IOwinContext context)
View gist:f8b0e3e306b3b9a8371f
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace FormsPlayground
{
class RelativeLayoutDemoPage : ContentPage
View servicecontainer.cs
public static class ServiceContainer
{
static readonly Dictionary<Type, Lazy<object>> services = new Dictionary<Type, Lazy<object>>();
public static void Register<T>(Func<T> function)
{
services[typeof(T)] = new Lazy<object>(() => function());
}
public static T Resolve<T>()
View Rounding
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rounding
{
public class Program
{
public static void Main(string[] args)
You can’t perform that action at this time.