Windows Phone 8中的自定义形状

时间:2013-10-22 13:55:34

标签: windows-phone-8 custom-controls

我想在以下派生Shape类:

class MyRectangle : Shape
{
    protected override System.Windows.Media.Geometry DefiningGeometry
    {
        get { return null; }
    }
}

但我收到错误,因为无法覆盖DefiningGeometry属性(虽然wpf可以)。 如何在WP8中自定义形状?

1 个答案:

答案 0 :(得分:0)

您应该将自定义形状基于Path,而不是直接从Shape继承。