MeasurementGraphics
Provides a lightweight graphics context optimized for measurement operations without rendering. Uses a shared memory device context for better performance than creating new graphics contexts.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
public class MeasurementGraphics : IDisposable
Inheritance: objectMeasurementGraphics
Implements:
Properties
Gets the Graphics object associated with this measurement graphics context.
public Graphics Graphics { get; }
A Graphics object backed by a memory device context for measurement operations such as measuring text size or calculating drawing dimensions.
This Graphics object can be used for measurement operations without requiring a visible drawing surface. Do not dispose this Graphics object manually as it is managed by the MeasurementGraphics instance.
Gets the synchronization object used for thread-safe operations when working with measurement graphics.
public static object SyncObject { get; }
A synchronization object that can be used for locking critical sections.
Use this object when you need to synchronize access to measurement graphics operations across multiple threads or when performing operations that require atomic access.
Methods
Creates a new instance of MeasurementGraphics for performing measurement operations.
public static MeasurementGraphics CreateMeasurementGraphics()
A new MeasurementGraphics instance that provides access to a graphics context optimized for measurement operations.
Factory method for creating MeasurementGraphics instances. The returned instance should be disposed when no longer needed, preferably using a using statement.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements:
This implementation of Dispose does not actually release resources immediately. The underlying memory device context is managed through reference counting using the and methods.
The memory device context is automatically released when the last control on the current thread decreases the control count to zero.