Skip to content

Instantly share code, notes, and snippets.

@punker76
Created April 25, 2018 21:40
Show Gist options
  • Save punker76/556299e9c25b8e6f1af98f6056a97599 to your computer and use it in GitHub Desktop.
Save punker76/556299e9c25b8e6f1af98f6056a97599 to your computer and use it in GitHub Desktop.
dependencyProperty R# template
/// <summary>
/// Identifies the <see cref="$propertyName$"/> dependency property.
/// </summary>
public static readonly $dependencyProperty$ $propertyName$Property
= $dependencyProperty$.Register(nameof($propertyName$), typeof($propertyType$), typeof($containingType$), new PropertyMetadata(default($propertyType$)));
/// <summary>
/// Get or sets the $propertyName$ property.
/// </summary>
public $propertyType$ $propertyName$
{
get { return ($propertyType$) GetValue($propertyName$Property); }
set { SetValue($propertyName$Property, value); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment