custom shape in windows phone 8

坚强是说给别人听的谎言 提交于 2019-12-25 09:38:45

问题


I want to derive Shape class following:

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

but I get error because DefiningGeometry property can't be overrided (althought wpf can). How can i custom shape in WP8 ?


回答1:


You should base your custom shape on a Path rather than inheriting from Shape directly.



来源:https://stackoverflow.com/questions/19519936/custom-shape-in-windows-phone-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!