Created
April 25, 2017 11:35
-
-
Save atzimler/5495a5628caf0c845ff5aec8f7d98edd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static readonly DependencyProperty AProperty = | |
| DependencyProperty.Register(nameof(A), | |
| typeof(int), | |
| typeof(AddCalculation), | |
| new PropertyMetadata(0, AddNumbers)); | |
| private static void AddNumbers(DependencyObject d, DependencyPropertyChangedEventArgs e) | |
| { | |
| var ac = (AddCalculation)d; | |
| ac.SetValue(ResultPropertyKey, ac.A + ac.B); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment