Class OutLookGripPrimitive
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.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll
Syntax
public class OutLookGripPrimitive : FillPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Remarks
The OutLookGripPrimitive class extends FillPrimitive to provide specialized rendering capabilities for Outlook-style grip handles. These grips are characterized by a horizontal row of dots arranged in the center of the element, providing a distinctive visual indicator for interactive areas that can be dragged or resized.
Unlike the vertical GripPrimitive, this primitive renders 9 dots horizontally centered within the element, creating the familiar Outlook grip appearance commonly seen in pane separators, toolbars, and resizable interface elements. Each dot includes a white shadow effect for enhanced visual depth and better visibility against various background colors.
The primitive inherits fill capabilities from its base class, allowing for background rendering before drawing the grip dots. It also sets a high Z-index (10000) to ensure the grip appears above other visual elements in the same container.
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, Single, 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
IGraphics
g
The IGraphics interface used for drawing the grip dots. |
System.Single
angle
The rotation angle in degrees to apply to the rendered content. |
System.Drawing.SizeF
scale
The scaling factor to apply to the rendered content. |
Overrides
Remarks
This method first calls the base PaintPrimitive(IGraphics, Single, 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.