为什么我不能从 GridViewRowPresenterBase 派生?
public class GridViewRowPresenterEx : GridViewRowPresenterBase
{
protected override void OnColumnPropertyChanged(GridViewColumn c, string s)
{
}
}
我遇到以下编译错误:
'GridViewRowPresenterEx' does not implement inherited abstract member System.Windows.Controls.Primitives.GridViewRowPresenterBase.OnColumnPropertyChanged(System.Windows.Controls.GridViewColumn, string)'
'GridViewRowPresenterEx.OnColumnPropertyChanged(System.Windows.Controls.GridViewColumn, string)': no suitable method found to override
最佳答案
GridViewRowPresenterBase 公开的OnColumnPropertyChanged()
方法是内部摘要
(你可以在源代码中看到它here)。
不幸的是,there is no way在其原始程序集之外实现 internal abstract
方法。看起来 GridViewRowPresenterBase
被设计为只能由 PresentationFramework.dll
中的其他类派生。
关于c# - 为什么我不能从 GridViewRow PresenterBase 派生?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12871839/