ClassOutLookGripPrimitive
Represents a primitive element that renders an Outlook-style grip handle, specifically designed for resizing and moving interface elements in Microsoft Outlook-like applications within the Telerik WinControls framework.
Definition
Namespace:Telerik.WinControls.Primitives
Assembly:Telerik.WinControls.dll
Syntax:
public class OutLookGripPrimitive : FillPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveFillPrimitiveOutLookGripPrimitive
Implements:
Inherited Members
Constructors
OutLookGripPrimitive()
Declaration
public OutLookGripPrimitive()
Methods
CreateChildElements()
Creates and initializes child elements for the Outlook grip primitive.
Declaration
protected override void CreateChildElements()
Overrides
Remarks
This method performs the base initialization and sets a high Z-index value to ensure the grip primitive appears above other visual elements in the same container. The high Z-index (10000) guarantees that the grip remains visible and interactive even when other elements are layered in the same visual tree.
The Z-index setting is particularly important for grip elements as they need to remain accessible for user interaction regardless of other visual elements that might be present in the same container.
PaintPrimitive(IGraphics, float, SizeF)
Renders the Outlook-style grip handle using the specified graphics context, applying rotation and scaling transformations.
Declaration
public override void PaintPrimitive(IGraphics g, float angle, SizeF scale)
Parameters
g
The IGraphics interface used for drawing the grip dots.
angle
The rotation angle in degrees to apply to the rendered content.
scale
The scaling factor to apply to the rendered content.
Overrides
Remarks
This method first calls the base PaintPrimitive(IGraphics, float, SizeF) method to render any background fill, then overlays the characteristic Outlook-style grip pattern consisting of 9 horizontal dots arranged in a single row.
The rendering process:
- Renders the base fill background if configured
- Calculates the starting position centered horizontally (width/2 - 18 pixels)
- Renders 9 dots horizontally with 4-pixel spacing between each dot
- Each dot consists of a white shadow rectangle and a black main rectangle
- Shadow rectangles are offset by 0.1 pixels for subtle depth effect
The dots start at a vertical position of 4 pixels from the top and are each 2x2 pixels in size. The horizontal spacing creates the distinctive Outlook grip appearance that users recognize as an interactive handle for resizing or moving interface elements.