Skip to content

Instantly share code, notes, and snippets.

@matthewrdev
Created October 13, 2018 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewrdev/bccd59e0b2b558a12d5b9897ba61d9d6 to your computer and use it in GitHub Desktop.
Save matthewrdev/bccd59e0b2b558a12d5b9897ba61d9d6 to your computer and use it in GitHub Desktop.
using System;
namespace MyApp.Attributes
{
/// <summary>
/// Apply the design time binding context attribute to your code-behind class to inform tools of your intended runtime binding context.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class DesignTimeBindingContextAttribute : Attribute
{
/// <summary>
/// Specifies the design time binding context using a fully qualified type name.
///
/// For example: "MyApp.ViewModels.LoginViewModel"
/// </summary>
/// <param name="typeName">The fully qualified type name for the design time binding context.</param>
public DesignTimeBindingContextAttribute(string typeName)
{
}
/// <summary>
/// Specifies the design time binding context using typeof().
///
/// For example: typeof(LoginViewModel)
/// </summary>
/// <param name="type">The <see cref="System.Type"/> for the design time binding context, using typeof().</param>
public DesignTimeBindingContextAttribute(Type type)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment