Skip to content

Instantly share code, notes, and snippets.

View willsam100's full-sized avatar

Sam Williams willsam100

View GitHub Profile
namespace FooBarIde
{
class InsertDateHandler : CommandHandler
{
protected override void Run()
{
Document doc = IdeApp.Workbench.ActiveDocument;
try
{
@willsam100
willsam100 / ViewModelBaseSimple.fs
Created August 27, 2018 18:13
F# Simple View Model Base
namespace YourNameSpaceHere
open System.ComponentModel
type ViewModelBase() =
let propertyChanged = new Event<_, _>()
interface INotifyPropertyChanged with
[<CLIEvent>]
member this.PropertyChanged = propertyChanged.Publish
@willsam100
willsam100 / ViewModelBase.fs
Last active August 27, 2018 18:17
F# ViewModel Base
namespace YourNamespaceHere
open System
open System.Collections.ObjectModel
open System.ComponentModel
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns
type ViewModelBase() =
let propertyChanged = new Event<_, _>()
let toPropName(query : Expr) =