Skip to content

Instantly share code, notes, and snippets.

View jgable's full-sized avatar

Jacob Gable jgable

  • Making Other People Money
  • San Carlos, CA
  • X @jacob4u2
View GitHub Profile
@jgable
jgable / DragDropBehaviours.cs
Created February 24, 2011 21:01
An easy to implement DragDropBehavior for incorporating drag and drop in your silverlight 4 application; also includes a FileDragDropBehavior for easy file drag and drop
using System.IO;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interactivity;
/// <summary>
/// A simple file drag and drop behavior.
/// </summary>
public class FileDragDropBehavior : DragDropBehavior<FileInfo[]>
{
@jgable
jgable / CheckedItemCollection.cs
Created February 24, 2011 19:12
CheckedItemCollection for wrapping a collection of checkable items
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Linq;
using System;
/// <summary>
/// A collection of checked items.
/// </summary>
/// <typeparam name="TItem">The type of the item.</typeparam>
public class CheckedItemCollection<TItem> : ObservableCollection<CheckedItemWrapper<TItem>>
@jgable
jgable / EventToCommandTrigger.cs
Created February 22, 2011 18:58
ClickCommandTrigger from MVVMLight EventToCommand TriggerAction
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using GalaSoft.MvvmLight.Command;
public class ClickCommandTrigger : System.Windows.Interactivity.EventTriggerBase<Button>
{
/// <summary>