Bas*_*Bas 5 .net c# design-time visual-studio-2010
我正在为WPF和Silverlight开发自定义控件.此控件具有抽象的复杂类型的collection属性,如下所示:
public Collection<MyBase> Configuration
{
get { return (Collection<MyBase>)GetValue(ConfigurationProperty); }
set { SetValue(ConfigurationProperty, value); }
}
// Using a DependencyProperty as the backing store for Configuration This enables animation, styling, binding, etc...
public static readonly DependencyProperty ConfigurationProperty =
DependencyProperty.Register("Configuration", typeof(Collection<MyBase>), typeof(MyControl), new PropertyMetadata(new ObservableCollection<MyBase>()));
Run Code Online (Sandbox Code Playgroud)
我的问题是我无法在Visual Studio 2010的设计器中向此属性添加新项目,因为它不知道任何派生类型的MyBase.
有没有办法向设计师注册这些类型?编辑器可以正常使用现有项目,并可以删除和修改它们.一张图片来说明:

| 归档时间: |
|
| 查看次数: |
1687 次 |
| 最近记录: |