[Question] Resources to learn how to create custom controls

If you are intrested, I didn't do it elegant, my solution: `[TemplatePart(Name="PART_Circle",Type=typeof(Shape))] [TemplatePart(Name = "PART_HorizontalLine",Type=typeof(Shape))] [TemplatePart(Name = "PART_VerticalLine", Type = typeof(Shape))] public class CircleButton : Button{ static CircleButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(CircleButton), new FrameworkPropertyMetadata(typeof(CircleButton))); } public override void OnApplyTemplate(){ base.OnApplyTemplate(); Line horizontalLine = GetTemplateChild("PART_HorizontalLine") as Line; Line verticalLine = GetTemplateChild("PART_VerticalLine") as Line; Ellipse ellipse = GetTemplateChild("PART_Circle") as Ellipse; if (ellipse != null){ if (horizontalLine != null){ horizontalLine.Y1 = ellipse.Width/2; horizontalLine.X1 = 0; horizontalLine.X2 = ellipse.Width0.6; horizontalLine.Y2 = ellipse.Width/2; } if (verticalLine != null){ verticalLine.X1 = ellipse.Width/2; verticalLine.Y1 = 0; verticalLine.X2 = ellipse.Width/2; verticalLine.Y2 = ellipse.Width0.6; } }

    }
}

`}

/r/csharp Thread Parent