1
在WPF中,可以通过属性或内部属性设置自定义控件的属性。像这样:在ASP.net中使用自定义控件的WPF类属性
<custom:UserControl1 Text="My text here..."></custom:UserControl1>
等于:
<custom:UserControl1>
<custom:UserControl1.Text>
My text here...
</custom:UserControl1.Text>
</custom:UserControl1>
在ASP.net定制控制属性的类型可以由PersistenceMode属性来定义。目前我只能找到一种方法来定义一个属性,作为属性或内部属性。
有没有一种可能的方式来设置WPF自定义控件属性?
谢谢!