title: Dependency property error
body: <p>I am learning dependency properties. I read many posts &amp; books but still I am not clear. </p>
  
  <p>The program shown below is which I wrote to learn. Some error in that, please help in resolving. I have questions.</p>
  
  <ol>
  <li>The main use of custom Dependency property element is for the notification of change?</li>
  <li>I found an 'IsDefaultProperty' code for <strong>Button</strong> in a WPF text book. It means '<strong>IsDefault</strong>' property is a dependency property?</li>
  <li>Why they shown that code? It means, internally, in Button class, its defined like that? 
  (They showed internal code?) or they showed how to define as custom?</li>
  </ol>
  
  <p>Here is my code:</p>
  
  <pre><code>namespace DependencyProperties
  {
      public class Contact
      {
          private int id=100;
          private string name="shri";
          public static readonly DependencyProperty IsPresentProperty;
  
          public int ID
          {
              get { return id; }
          }
          public string NAME
          {
              get { return name; }
          }
  
          static Contact()
          {
              IsPresentProperty = DependencyProperty.Register("IsPresent", typeof(bool),typeof(Contact),new FrameworkPropertyMetadata(false,new PropertyChangedCallback(OnIsPresentChanged)));
          }
  
          public bool Present
          {
              get { return (bool)GetValue(Contact.IsPresentProperty); }
              set { SetValue(Contact.IsPresentProperty, value); }
          }
  
          private static void OnIsPresentChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
          {  
  
          }
      }
  }
  </code></pre>
  
  <p>And I see the error:</p>
  
  <pre><code>&gt; Error: GetValue and SetValue does not exist in the current context
  </code></pre>