Skip to content

Instantly share code, notes, and snippets.

@dmunch
Created August 18, 2014 15:58
Show Gist options
  • Save dmunch/3b66a9155de48a97e6f2 to your computer and use it in GitHub Desktop.
Save dmunch/3b66a9155de48a97e6f2 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Luax.Xaml.AttachedBehaviours.Blog
{
class NegateConverter : IValueConverter
{
public object Convert(object value, Type targetType,
object parameter, CultureInfo culture)
{
return !((bool)value);
}
public object ConvertBack(object value, Type targetType,
object parameter, CultureInfo culture)
{
return !((bool)value);
}
}
class ClickBehaviorTestViewModel : ViewModel
{
public Command Clicked { get; set; }
protected bool isChecked = false;
public bool IsChecked
{
get { return isChecked; }
set { this.ChangeAndNotify(ref isChecked, value); }
}
public ClickBehaviorTestViewModel()
{
this.Clicked = new Command(p => OnClicked(p));
}
public void OnClicked(object p)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment