只是一个简短的问题,澄清一些疑问。当元素绑定到依赖属性时,设置器是否不运行?
原文链接:https://www.f2er.com/javaschema/282466.htmlpublic string TextContent { get { return (string)GetValue(TextContentProperty); } set { SetValue(TextContentProperty,value); Debug.WriteLine("Setting value of TextContent: " + value); } } public static readonly DependencyProperty TextContentProperty = DependencyProperty.Register("TextContent",typeof(string),typeof(MarkdownEditor),new UIPropertyMetadata(""));
… …
<TextBox Text="{Binding TextContent}" />
正如我注意到下面在我的安装程序不运行
Debug.WriteLine("Setting value of TextContent: " + value);