Create custom Shape Control in UWP (Universal Windows Apps), Windows 10
问题 I want to create a custom Shape control, that paints different shapes like Polygon , Ellipse , Rectangle , etc, depending on some custom properties. I was able to create a custom template control ColorShape like this: <Style TargetType="local:CustomShape"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:CustomShape"> <ContentControl x:Name="shapeParent"> </ContentControl> </ControlTemplate> </Setter.Value> </Setter> </Style> And then, override the