title: Dependency Property default value depend on another Dependency Property
body: <p>I have two Dependency Property, <code>Value</code> and <code>MinVal</code>.<br>
  I want the default value of "Value" will depend on "MinVal".<br>
  The "MinVal" set by xaml only one time.<br>
  How can I do that?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    public int Value
      {
          get { return (int)GetValue(ValueProperty); }
          set { SetValue(ValueProperty, value); }
      }
  
      // Using a DependencyProperty as the backing store for Value.  This enables animation, styling, binding, etc...
      public static readonly DependencyProperty ValueProperty =
          DependencyProperty.Register("Value", typeof(int), typeof(NumericHexUpDown), new UIPropertyMetadata(0, ValueChanged));
  
      private static void ValueChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
  
      }
  
  
      public int MinVal
      {
          get { return (int)GetValue(MinValProperty); }
          set { SetValue(MinValProperty, value); }
      }
  
      // Using a DependencyProperty as the backing store for MinVal.  This enables animation, styling, binding, etc...
      public static readonly DependencyProperty MinValProperty =
          DependencyProperty.Register("MinVal", typeof(int), typeof(NumericHexUpDown), new UIPropertyMetadata(0, MinValueChanged));
      private static void MinValueChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
  
      }
  </code></pre>