skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class 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.

Inheritance
System.Object
MeasurementGraphics
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

public class MeasurementGraphics : IDisposable
Remarks

Thread-safe implementation with thread-static fields ensuring each thread has its own memory DC. Uses reference counting to manage the lifetime of the memory device context.

Properties

Graphics

Gets the Graphics object associated with this measurement graphics context.

Declaration
public Graphics Graphics { get; }
Property Value
System.Drawing.Graphics

A Graphics object backed by a memory device context for measurement operations such as measuring text size or calculating drawing dimensions.

Remarks

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.

SyncObject

Gets the synchronization object used for thread-safe operations when working with measurement graphics.

Declaration
public static object SyncObject { get; }
Property Value
System.Object

A synchronization object that can be used for locking critical sections.

Remarks

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

CreateMeasurementGraphics()

Creates a new instance of MeasurementGraphics for performing measurement operations.

Declaration
public static MeasurementGraphics CreateMeasurementGraphics()
Returns
MeasurementGraphics

A new MeasurementGraphics instance that provides access to a graphics context optimized for measurement operations.

Remarks

Factory method for creating MeasurementGraphics instances. The returned instance should be disposed when no longer needed, preferably using a using statement.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()
Remarks

This implementation of Dispose does not actually release resources immediately. The underlying memory device context is managed through reference counting using the Telerik.WinControls.MeasurementGraphics.IncreaseControlCount and Telerik.WinControls.MeasurementGraphics.DecreaseControlCount methods.

The memory device context is automatically released when the last control on the current thread decreases the control count to zero.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.