Answered by:
DependencyProperty Name WinRT

Question
-
Is there a way to get the name of a DependencyProperty?
I need to get the PropertyName for all the setters of a style.
- Edited by wyrda_g Friday, August 23, 2013 10:59 AM typo
Friday, August 23, 2013 9:39 AM
Answers
-
Take a look at http://msdn.microsoft.com/en-us/library/system.reflection.typeinfo.declaredproperties.aspx . That should list the properties identifying the DependencyProperties
--Rob
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Tuesday, August 27, 2013 4:25 PM
Friday, August 23, 2013 6:12 PMModerator -
I solve the problem with Reflection getting all DependencyProperties for target type, Control and FrameworkElement and comparing to see which one is.
Anyway, I think that they could let the Name property on the DependencyProperty object so we don't do stuff like Reflection to obtain it.
- Marked as answer by wyrda_g Tuesday, August 27, 2013 1:09 PM
Tuesday, August 27, 2013 1:09 PM
All replies
-
Take a look at http://msdn.microsoft.com/en-us/library/system.reflection.typeinfo.declaredproperties.aspx . That should list the properties identifying the DependencyProperties
--Rob
- Marked as answer by Rob Caplan [MSFT]Microsoft employee, Moderator Tuesday, August 27, 2013 4:25 PM
Friday, August 23, 2013 6:12 PMModerator -
I solve the problem with Reflection getting all DependencyProperties for target type, Control and FrameworkElement and comparing to see which one is.
Anyway, I think that they could let the Name property on the DependencyProperty object so we don't do stuff like Reflection to obtain it.
- Marked as answer by wyrda_g Tuesday, August 27, 2013 1:09 PM
Tuesday, August 27, 2013 1:09 PM