WPF contains many powerful mechanisms that independently attempt to set the value of dependency properties.


  1. Step 1: Determine the Base Value(in order from highest to lowest precedence)
    1. Local value 
    2. Parent template trigger
    3. Parent template
    4. Style triggers
    5. Template triggers
    6. Style setters
    7. Theme style triggers
    8. Theme style setters
    9. Property value inheritance 
    10. Default value
  2. Step 2: Evaluate
  3. Step 3: Apply Animations
  4. Step 4: Coerce
  5. Step 5: Validate
SetCurrentValue
WPF 4 adds a new method to DependencyObject called SetCurrentValue. It directly updates the current value of a property without changing its value source. (The value is still subject to coercion and validation.) This is meant for controls that set values in response to user interaction. For example, the RadioButton control modifies the value of the IsChecked property on other RadioButtons in the same group, based on user interaction. In prior versions of WPF, it sets a local value, which overrides all of the other value sources and can break things like data binding. In WPF 4, RadioButton has been changed to use SetCurrentValue instead.

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter