How to add dependency property to FrameworkElement driven classes in WPF?
问题 I need key and Value property in all controls which are drives from FrameworkElement class in wpf. key and value property are needed for some internal purpose. I know we have a Tag property which is used for saving custom data. I need two more such properties. Any suggestions? 回答1: You don't need to create another property, as you know Tag property will allow you to save custom data. This is example of how you can store data in the Tag . public class Customdata { public int Id { get; set; }