Skip to content

Instantly share code, notes, and snippets.

View ChaseFlorell's full-sized avatar
🇨🇦

Chase Florell ChaseFlorell

🇨🇦
View GitHub Profile
@ChaseFlorell
ChaseFlorell / Cirrious.MvvmCross.ExternalAnnotations.xml
Last active August 29, 2015 13:57
Place this file beside the `Cirrious.MvvmCross.dll` file in each of the `lib` directories. Doing so will enable you to [alt] + [enter] (resharper) on an AutoProperty, and get the additional option "To property with change notification".
<?xml version="1.0" encoding="utf-8"?>
<assembly name="Cirrious.MvvmCross">
<member name="M:Cirrious.MvvmCross.ViewModels.MvxNotifyPropertyChanged.RaisePropertyChanged``1(System.Linq.Expressions.Expression{System.Func{``0}})">
<attribute ctor="M:JetBrains.Annotations.NotifyPropertyChangedInvocatorAttribute.#ctor" />
</member>
</assembly>
<!-- https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross/ViewModels/MvxNotifyPropertyChanged.cs#L40 -->
'use strict';
myApp.directive('backButton', function () {
return {
restrict: 'E',
link: function (scope, element, attrs) {
element.bind('click', goBack);
function goBack() {
'use strict';
/*
*usage: <markdown ng:model="box.content"></markdown>
*/
myApp.directive('markdown', function ($compile) {
var nextId = 0;
//Make converter only once to save a bit of load each time - thanks to ajoslin
var converter = new Markdown.Converter();
@ChaseFlorell
ChaseFlorell / FragmentActivityBase.cs
Last active August 29, 2015 13:58
Simple way to Show a Fragment from within an MvxFragmentActivity
using System;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.Droid.Fragging;
using Cirrious.MvvmCross.Droid.Fragging.Fragments;
using Cirrious.MvvmCross.ViewModels;
namespace $NAMESPACE$
{
public class FragmentActivityBase : MvxFragmentActivity
{
@ChaseFlorell
ChaseFlorell / snippet.cs
Created April 12, 2014 04:38
How to prevent icon slide on Right navigation drawer
public override void OnDrawerSlide(View drawerView, float slideOffset)
{
if (null != DrawerSlide)
DrawerSlide(this, new ActionBarDrawerEventArgs
{
DrawerView = drawerView,
SlideOffset = slideOffset
});
// only slide the left nav item
@ChaseFlorell
ChaseFlorell / DrawerToggler.cs
Last active August 29, 2015 13:59
An Android Navigation Drawer that supports single and dual sliding drawers.
using System;
using Android.App;
using Android.Support.V4.App;
using Android.Support.V4.Widget;
using Android.Views;
namespace FutureState.BreathingRoom.Droid.Ui
{
public class ActionBarDrawerEventArgs : EventArgs
{
@ChaseFlorell
ChaseFlorell / FragmentActivityBase.cs
Created May 7, 2014 13:50
Just trying to figure out how to better structure a FragmentActivity in order to reduce "noise" in the RootView
using System;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.Droid.Fragging;
using Cirrious.MvvmCross.Droid.Fragging.Fragments;
using Cirrious.MvvmCross.ViewModels;
namespace FutureState.BreathingRoom.Droid.Ui.Views
{
internal class FragmentActivityBase : MvxFragmentActivity
{
using System;
using Cirrious.MvvmCross.Binding.Touch.Views;
using Cirrious.MvvmCross.Touch.Views.Presenters;
using FutureState.BreathingRoom.Touch.Ui.Controllers;
using FutureState.BreathingRoom.Touch.Ui.Fragments;
using MonoTouch.UIKit;
using SlidingPanels.Lib.PanelContainers;
namespace FutureState.BreathingRoom.Touch.Ui.Presenters
{
@ChaseFlorell
ChaseFlorell / CustomPresenter.cs
Created May 23, 2014 03:51
Custom Presenter not showing appropriate ViewModel when calling `ViewModel.ShowViewModel<MyViewModel>();`
using System;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.Binding.Touch.Views;
using Cirrious.MvvmCross.Touch.Views;
using Cirrious.MvvmCross.Touch.Views.Presenters;
using Cirrious.MvvmCross.ViewModels;
using FutureState.AppCore.ViewModels;
using FutureState.BreathingRoom.Touch.Ui.Controllers;
using FutureState.BreathingRoom.Touch.Ui.Fragments;
using MonoTouch.UIKit;
@ChaseFlorell
ChaseFlorell / App.cs
Last active August 29, 2015 14:04
This Gist is in response to the following Xamarin.Forms question: http://forums.xamarin.com/discussion/comment/68992/#Comment_68992
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace perfomance
{