Class FocusPrimitive
Represents a primitive element that renders focus indicators for UI controls.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll
Syntax
public class FocusPrimitive : BasePrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive
Remarks
FocusPrimitive is responsible for drawing focus rectangles and other visual indicators that show when a control has keyboard focus. It typically renders a dotted or dashed border around the focused element to provide clear visual feedback to users.
The primitive supports various focus styles including standard Windows focus rectangles, custom border styles, and gradient-based focus indicators. It works in conjunction with BorderPrimitive to provide comprehensive focus visualization.
FocusPrimitive is essential for accessibility compliance and keyboard navigation support, ensuring that users can clearly identify which control currently has input focus.
Constructors
FocusPrimitive(BorderPrimitive)
Fields
BorderBoxStyleProperty
ForeColor2Property
ForeColor3Property
ForeColor4Property
GradientAngleProperty
GradientStyleProperty
InnerColor2Property
InnerColor3Property
InnerColor4Property
InnerColorProperty
Properties
BoxStyle
Gets or sets the border box style for the focus indicator.
Declaration
[RadPropertyDefaultValue("BoxStyle", typeof(FocusPrimitive))]
public BorderBoxStyle BoxStyle { get; set; }
Property Value
BorderBoxStyle
A BorderBoxStyle value that determines how the focus border is rendered. |
Remarks
The box style affects how the focus border appears, including whether it's a single border, four separate borders, or outer and inner borders for enhanced visibility.
FitToSizeMode
Declaration
public override RadFitToSizeMode FitToSizeMode { get; set; }
Property Value
RadFitToSizeMode
|
Overrides
ForeColor2
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor2", typeof(FocusPrimitive))]
public virtual Color ForeColor2 { get; set; }
Property Value
System.Drawing.Color
|
ForeColor3
Gets or sets color used by radial, glass, office glass, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor3", typeof(FocusPrimitive))]
public virtual Color ForeColor3 { get; set; }
Property Value
System.Drawing.Color
|
ForeColor4
Gets or sets color used by radial, glass, office glass, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor4", typeof(FocusPrimitive))]
public virtual Color ForeColor4 { get; set; }
Property Value
System.Drawing.Color
|
GradientAngle
Gets or sets gradient angle for linear gradient measured in degrees.
Declaration
[RadPropertyDefaultValue("GradientAngle", typeof(FocusPrimitive))]
public float GradientAngle { get; set; }
Property Value
System.Single
|
GradientStyle
Gets or sets gradient style. Possible styles are solid, linear, radial, glass, office glass, gel, and vista.
Declaration
[RadPropertyDefaultValue("GradientStyle", typeof(FocusPrimitive))]
public GradientStyles GradientStyle { get; set; }
Property Value
GradientStyles
|
InnerColor
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor", typeof(FocusPrimitive))]
public virtual Color InnerColor { get; set; }
Property Value
System.Drawing.Color
|
InnerColor2
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor2", typeof(FocusPrimitive))]
public virtual Color InnerColor2 { get; set; }
Property Value
System.Drawing.Color
|
InnerColor3
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor3", typeof(FocusPrimitive))]
public virtual Color InnerColor3 { get; set; }
Property Value
System.Drawing.Color
|
InnerColor4
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor4", typeof(FocusPrimitive))]
public virtual Color InnerColor4 { get; set; }
Property Value
System.Drawing.Color
|
Methods
InitializeFields()
PaintPrimitive(IGraphics, Single, SizeF)
Declaration
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics
graphics
|
System.Single
angle
|
System.Drawing.SizeF
scale
|