wpf DependencyProperty two way code example
Example: wpf get dependency property in code
string automationId =
(string)myButton.GetValue(AutomationProperties.AutomationIdProperty);
string automationId =
(string)myButton.GetValue(AutomationProperties.AutomationIdProperty);