C# 继承System.Windows.PresentationFrameworkCollection<;T>;在Silverlight图书馆

C# 继承System.Windows.PresentationFrameworkCollection<;T>;在Silverlight图书馆,c#,silverlight,silverlight-4.0,C#,Silverlight,Silverlight 4.0,类型System.Windows.PresentationFrameworkCollection是否不用于继承?我试图创建一个自定义的AnimationsFromKeyFrames对象,但我无法为KeyFrames属性创建集合类型,因为Visual Studio显然正在弥补一些错误。 Visual Studio报告未实现以下抽象成员,即使它们不存在于任何继承的对象上: “MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFra

类型
System.Windows.PresentationFrameworkCollection
是否不用于继承?我试图创建一个自定义的
AnimationsFromKeyFrames
对象,但我无法为KeyFrames属性创建集合类型,因为Visual Studio显然正在弥补一些错误。

Visual Studio报告未实现以下抽象成员,即使它们不存在于任何继承的对象上:

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.SetItemImplSkipMethodPack(int,MyKeyFrame)”

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.GetItemImplSkipMethodPack(int)”

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.RemoveInternal(MyKeyFrame)”

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.InsertInternal(int,MyKeyFrame)”

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.IndexOfInternal(MyKeyFrame)”的

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.Contains内部(MyKeyFrame)”

“MyKeyFrameCollection”未实现继承的抽象成员“System.Windows.PresentationFrameworkCollection.AddInternal(MyKeyFrame)”

我如何从bizarro world实现这些方法,或者告诉Visual Studio停止编造抱怨,只编译项目?

我尝试使用以下方法明确定义这些方法,但这些方法不起作用(根据之前的不存在评论,这是正确的):

void System.Windows.PresentationFrameworkCollection.AddInner(我的关键帧)
void System.Collections.Generic.IList.AddInternal(MyKeyFrame关键帧)
void System.Collections.Generic.ICollection.AddInternal(MyKeyFrame关键帧)
void System.Collections.IList.AddInternal(MyKeyFrame关键帧)
void System.Collections.ICollection.AddInternal(MyKeyFrame关键帧)
到了智囊团的尽头,还认为微软不希望社区进行关键帧收集


编辑:我已经尝试过了,我唯一的
覆盖
选项是
等于
获取hashcode
,以及
到字符串
。这些抽象成员是否可能是受保护的内部成员,以便现有的框架类可以从它们继承,但是自定义类不能?

PresentationFrameworkCollection
是一个公共抽象类,但是您所指的成员是
内部抽象
,这意味着您不能覆盖它们。

这就是我所担心的。我试图通过继承
DependencyObject
并实现
IList
来绕过它,这与
PresentationFrameworkCollection
的工作方式类似,但现在当我尝试渲染时,遇到了COM异常。现在就把整件事都搞定。
void System.Windows.PresentationFrameworkCollection<MyKeyFrame>.AddInternal(MyKeyFrame keyFrame)
void System.Collections.Generic.IList<MyKeyFrame>.AddInternal(MyKeyFrame keyFrame)
void System.Collections.Generic.ICollection<MyKeyFrame>.AddInternal(MyKeyFrame keyFrame)
void System.Collections.IList.AddInternal(MyKeyFrame keyFrame)
void System.Collections.ICollection.AddInternal(MyKeyFrame keyFrame)