private static System.ComponentModel.DependencyPropertyDescriptor descriptor = System.ComponentModel.DependencyPropertyDescriptor.FromProperty(TextBlock.TextProperty, typeof(TextBlock)); descriptor.AddValueChanged(tb, TbTextChanged); private static void TbTextChanged(object sender,EventArgs e) { //do something }
标签:DependencyPropertyDescriptor,Text,System,private,TextBlock,static,WPF From: https://www.cnblogs.com/ppcc/p/17449177.html