title: Trying to understand of DependencyProperty
body: <p>Being new to WPF, and its apparently amazing ability to change, bind, enable, and otherwise manipulate.  I'm trying to get a mental overview of what is happening and hope some can either confirm or correct my readings.</p>
  
  <p>Before WPF, you have delegates and events.  You could have a dozen controls all listening (via being registered to the event), so when the event fires, all other controls will be notified automatically and can act on however they were so coded.   Such as...</p>
  
  <p>From Code Behind, you would do something like</p>
  
  <pre><code>GotFocus += MyMethodToDoSomething;
  </code></pre>
  
  <p>Then, the signature method</p>
  
  <pre><code>private void MyMethodToDoSomething(object sender, RoutedEventArgs e)
  {
    .. do whatever
  }
  </code></pre>
  
  <p>Additionally, by using standard getter / setter, the setter can call its own methods in its own class to do something every time someone tries to get or set a value</p>
  
  <pre><code>private int someValue;
  public int SomeValue
  {
     get { this.DoSomeOtherThing();
           return someValue;
         }
  
     set { this.DoAnotherThing();
          someValue = value;
  }
  </code></pre>
  
  <p>Now, there's dependency properties, and the one/two-way binding.  I understand (I think) about one-way to simulate more of a read-only operation.</p>
  
  <p>Anyhow, with two way binding, the dependencies automatically notify anyone "depending" on a change in either the source or target respectively, without an explicit check if something has subscribed to an event, the framework automatically handles the announcing of the change to the respective controls (target or source).</p>
  
  <p>So, let me through this scenario out with an old Add/Edit  Save/Cancel maintenance form.
  In an older framework, if someone clicked on an add or edit button, all the data entry fields would become "enabled" with either blank data for a new record, or editing existing data.  At the same time, the add/edit buttons would become disabled, but the Save/Cancel buttons would now become enabled.</p>
  
  <p>Likewise when finished via Save/Cancel, it would disable all the entry fields, save/cancel, and re-enable the Add/Edit buttons.</p>
  
  <p>I don't quite understand how such this type of scenario would be handled under this dependency property scenario (yet), but am I close?  I also understand you can bind to almost anything, including color schemes, show/hide, fonts, etc...  But I'm taking small steps on trying to really grasp this stuff.</p>
  
  <p>Thanks.</p>