Skip to content

Instantly share code, notes, and snippets.

View DanRigby's full-sized avatar

Dan Rigby DanRigby

View GitHub Profile
@DanRigby
DanRigby / BindableBase.cs
Last active March 9, 2021 08:36
BindableBase class for implementing INotifyPropertyChanged using C# 6 features while targeting .NET 2.0 to .NET 4.0. Make sure to use the nameof() operator for passing the propertyName parameter.
using System.ComponentModel;
/// <summary>
/// Implementation of <see cref="INotifyPropertyChanged" /> to simplify models.
/// </summary>
public abstract class BindableBase : INotifyPropertyChanged
{
/// <summary>
/// Multicast event for property change notifications.
/// </summary>

Keybase proof

I hereby claim:

  • I am danrigby on github.
  • I am danrigby (https://keybase.io/danrigby) on keybase.
  • I have a public key whose fingerprint is 16E8 38A7 E9C7 0998 B356 72C5 449F 0CD5 4F07 61A4

To claim this, I am signing this object:

@DanRigby
DanRigby / gist:2591628
Created May 4, 2012 03:02
Handling compiled content files (*.xnb) for an XNA/MonoGame codebase
  • Create a folder named Content under the Project Folder.

  • Add to the XNA Windows project file:

    <PropertyGroup>
        <PostBuildEvent>xcopy "$(ProjectDir)$(OutDir)Content\*.*" "$(ProjectDir)Content" /S /I /R /Y</PostBuildEvent>
    </PropertyGroup>