CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Dependency Property
C#
public class Button : ButtonBase
{
// The dependency property
public static readonly DependencyProperty IsDefaultProperty;
static Button()
{
// Register the property
Button.IsDefaultProperty = DependencyProperty.Register(“IsDefault”,
typeof(bool), typeof(Button),
new FrameworkPropertyMetadata(false,
by Vijay Sharma   April 22, 2011 @ 3:12am
133 Views
no comments
 
XML
<TemplatesExport family="Live Templates">
  <Template uid="a008a808-07e4-4027-9ed7-99167b28a16f" shortcut="dprop" description="Property wrapper that works with a Dependency Property" text="public $type$ $name$&#xD;&#xA;{&#xD;&#xA;   get { return ($type$) GetValue($name$Property); }&#xD;&#xA;   set { SetValue($name$Property, value); }&#xD;&#xA;}" reformat="True" shortenQualifiedReferences="True">
    <Categories />
    <Variables>
      <Variable name="type" expression="fixedTypeName()" initialRange="0" />
      <Variable name="name" expression="suggestVariableName()" initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
</TemplatesExport>
by Hadi Eskandari   January 31, 2011 @ 11:38pm
360 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate