c# wpf custom control with dependency property example
Example: wpf get dependency property in code
string automationId =
(string)myButton.GetValue(AutomationProperties.AutomationIdProperty);
string automationId =
(string)myButton.GetValue(AutomationProperties.AutomationIdProperty);