# FocusPrimitive

FocusPrimitive supplies user interface cues that an element has received focus. The constructor for FocusPrimitive takes a BorderPrimitive that provides the basic dimensions. Fore colors and inner colors may be set explicitly or default control colors are used.

![Telerik UI for WinForms FocusPrimitive indicating that an element has focus](https://www.telerik.com/products/winforms/documentation/assets/30e5833222c568669e76da2d0f46eb25/tpf-primitives-focusprimitive001.png)

#### Creating a FocusPrimitive

 

 

```C#
public class MyFocusPrimitiveElement : RadElement
{
    protected override void CreateChildElements()
    {
        BorderPrimitive borderPrimitive = new BorderPrimitive();
        borderPrimitive.Class = "MyBorderPrimtiveClass";
        borderPrimitive.BoxStyle = BorderBoxStyle.SingleBorder;
        borderPrimitive.Width = 3;
        borderPrimitive.ForeColor = Color.Red;
        borderPrimitive.GradientStyle = GradientStyles.Solid;
        FocusPrimitive focusPrimitive = new FocusPrimitive(borderPrimitive);
        this.Children.Add(borderPrimitive);
        this.Children.Add(focusPrimitive);
        base.CreateChildElements();
    }
}

```

```VB.NET
Public Class MyFocusPrimitiveElement
    Inherits RadElement
    Protected Overrides Sub CreateChildElements()
        Dim borderPrimitive As New BorderPrimitive()
        borderPrimitive.Class = "MyBorderPrimtiveClass"
        borderPrimitive.BoxStyle = BorderBoxStyle.SingleBorder
        borderPrimitive.Width = 3
        borderPrimitive.ForeColor = Color.Red
        borderPrimitive.GradientStyle = GradientStyles.Solid
        Dim focusPrimitive As New FocusPrimitive(borderPrimitive)
        Me.Children.Add(borderPrimitive)
        Me.Children.Add(focusPrimitive)
        MyBase.CreateChildElements()
    End Sub
End Class

```



## See Also

* [ArrowPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/arrowprimitive)

* [BorderPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/borderprimitive)

* [CheckPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/checkprimitive)

* [FillPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/fillprimitive)

* [GripPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/gripprimitive)

* [ImagePrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/imageprimitive)

* [ImageShape](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/imageshape)

* [LightVisualElement](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/lightvisualelement)
