【发布时间】:2013-12-02 19:14:52
【问题描述】:
我已经为 Window 类创建了自定义依赖属性。我在 xaml 中的 TextBox 上设置此属性,如下面的代码所示。 SampleProperty 类扩展了 Windows 类,而不是 Stackpanel。
<StackPanel l:SampleProperty.IsSamplePropertyField="true"/>
如何从我的代码中设置此属性?
【问题讨论】:
标签: .net wpf dependency-properties attached-properties