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 TelerikHelper

Inheritance
System.Object
TelerikHelper
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 TelerikHelper

Constructors

TelerikHelper()

Declaration
public TelerikHelper()

Fields

AnyBottomAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyBottomAlign
Field Value
System.Drawing.ContentAlignment

AnyCenterAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyCenterAlign
Field Value
System.Drawing.ContentAlignment

AnyLeftAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyLeftAlign
Field Value
System.Drawing.ContentAlignment

AnyMiddleAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyMiddleAlign
Field Value
System.Drawing.ContentAlignment

AnyRightAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyRightAlign
Field Value
System.Drawing.ContentAlignment

AnyTopAlign

Declaration
[Obsolete("Use LayoutUtils members instead. This member will be removed in 2026 Q2.")]
public static readonly ContentAlignment AnyTopAlign
Field Value
System.Drawing.ContentAlignment

Properties

IsNet47OrHigher

Declaration
public static bool IsNet47OrHigher { get; }
Property Value
System.Boolean

IsWindows10AnniversaryUpdateOrHigher

Declaration
public static bool IsWindows10AnniversaryUpdateOrHigher { get; }
Property Value
System.Boolean

IsWindows10CreatorsUpdateOrHigher

Declaration
public static bool IsWindows10CreatorsUpdateOrHigher { get; }
Property Value
System.Boolean

IsWindows10OrHigher

Gets a value indicating whether the current operating system is Windows 10 or higher.

Declaration
public static bool IsWindows10OrHigher { get; }
Property Value
System.Boolean

true if the operating system is Windows 10, Windows 11, or higher; otherwise, false.

Remarks

This property checks for Windows 10 by examining the build number (10240 or higher). It's useful for determining when Windows 10+ specific features like WinUI, modern theming, or enhanced DPI support can be used.

IsWindows11

Gets a value indicating whether the current operating system is Windows 11.

Declaration
public static bool IsWindows11 { get; }
Property Value
System.Boolean

true if the operating system is Windows 11; otherwise, false.

Remarks

This property specifically detects Windows 11 by checking for build number 21996 or higher on Windows 10+ systems. It's useful for enabling Windows 11-specific features like rounded corners, new system sounds, or updated visual styles.

IsWindows7

Gets a value indicating whether the current operating system is exactly Windows 7.

Declaration
public static bool IsWindows7 { get; }
Property Value
System.Boolean

true if the operating system is Windows 7; otherwise, false.

Remarks

This property specifically detects Windows 7 (version 6.1) and can be used for Windows 7-specific workarounds or feature enablement. Note that this returns false for Windows 7 SP1 or later service packs.

IsWindows7OrHigher

Gets a value indicating whether the current operating system is Windows 7 or higher.

Declaration
public static bool IsWindows7OrHigher { get; }
Property Value
System.Boolean

true if the operating system is Windows 7 or a more recent version; otherwise, false.

Remarks

This property checks for Windows 7 (version 6.1) or higher. It's useful for determining minimum OS requirements and enabling features that require Windows 7 APIs like improved taskbar integration, Aero effects, or enhanced touch support.

IsWindows7OrLower

Declaration
public static bool IsWindows7OrLower { get; }
Property Value
System.Boolean

IsWindows8OrHigher

Gets a value indicating whether the current operating system is Windows 8 or higher.

Declaration
public static bool IsWindows8OrHigher { get; }
Property Value
System.Boolean

true if the operating system is Windows 8, Windows 8.1, Windows 10, Windows 11, or higher; otherwise, false.

Remarks

This property checks the operating system version to determine compatibility with Windows 8 features and APIs. Windows 8 corresponds to version 6.2 or higher of the Windows NT platform.

IsWindows8OrLower

Gets a value indicating whether the current operating system is Windows 8 or lower.

Declaration
public static bool IsWindows8OrLower { get; }
Property Value
System.Boolean

true if the operating system is Windows 8 or an earlier version; otherwise, false.

Remarks

This property is useful for determining when to avoid Windows 8.1+ specific features or APIs. It returns true for Windows 8 (version 6.2) and all earlier Windows versions.

Methods

AnimateWindow(IntPtr, Int32, Int32)

Declaration
public static void AnimateWindow(IntPtr animatedControlHandle, int animationDuration, int dwFlags)
Parameters
System.IntPtr animatedControlHandle

System.Int32 animationDuration

System.Int32 dwFlags

CanProcessMnemonic(Control)

Declaration
public static bool CanProcessMnemonic(Control control)
Parameters
System.Windows.Forms.Control control

Returns
System.Boolean

CanProcessMnemonicNoRecursive(Control)

Declaration
public static bool CanProcessMnemonicNoRecursive(Control control)
Parameters
System.Windows.Forms.Control control

Returns
System.Boolean

ColorMixer(Color[])

Declaration
public static Color ColorMixer(params Color[] colors)
Parameters
System.Drawing.Color[] colors

Returns
System.Drawing.Color

ColorMixer(GradientStyles, Int32, Single, Single, Color[])

Declaration
public static Color ColorMixer(GradientStyles gradientStyle, int numberOfColors, float gradientPercent, float gradientPercent2, params Color[] colors)
Parameters
GradientStyles gradientStyle

System.Int32 numberOfColors

System.Single gradientPercent

System.Single gradientPercent2

System.Drawing.Color[] colors

Returns
System.Drawing.Color

ContainsMnemonic(String)

Declaration
public static bool ContainsMnemonic(string text)
Parameters
System.String text

Returns
System.Boolean

ControlAtPoint(Point)

Declaration
public static Control ControlAtPoint(Point point)
Parameters
System.Drawing.Point point

Returns
System.Windows.Forms.Control

ControlIsReallyVisible(Control)

Declaration
public static bool ControlIsReallyVisible(Control control)
Parameters
System.Windows.Forms.Control control

Returns
System.Boolean

CreateOutlineForm()

Declaration
public static Form CreateOutlineForm()
Returns
System.Windows.Forms.Form

CreateOutlineForm(Bitmap, Color)

Declaration
public static Form CreateOutlineForm(Bitmap image, Color color)
Parameters
System.Drawing.Bitmap image

System.Drawing.Color color

Returns
System.Windows.Forms.Form

CreateOutlineForm1()

Declaration
public static RadShimControl CreateOutlineForm1()
Returns
RadShimControl

CreateOutlineForm1(Bitmap, Color)

Declaration
public static RadShimControl CreateOutlineForm1(Bitmap image, Color color)
Parameters
System.Drawing.Bitmap image

System.Drawing.Color color

Returns
RadShimControl

FindRadControlParent(Control)

Searches the control hierarchy tree and returns the first RadControl that parents the control provided. Otherwise returns null.

Declaration
public static RadControl FindRadControlParent(Control control)
Parameters
System.Windows.Forms.Control control

Returns
RadControl

GetBoundingRect(Rectangle, RadMatrix)

Get bounding rectangle around rotated one.

Declaration
public static Rectangle GetBoundingRect(Rectangle rect, RadMatrix matrix)
Parameters
System.Drawing.Rectangle rect

Rectangle that is to be rotated

RadMatrix matrix

Returns
System.Drawing.Rectangle

Returns the bounding rectangle around the rectangle that is rotated according to the given matrix

GetBoundingRect(RectangleF, RadMatrix)

Declaration
public static RectangleF GetBoundingRect(RectangleF rect, RadMatrix matrix)
Parameters
System.Drawing.RectangleF rect

RadMatrix matrix

Returns
System.Drawing.RectangleF

GetColorAtPoint(Point)

Gets the color of the pixel at the specified location on the screen.

Declaration
public static Color GetColorAtPoint(Point location)
Parameters
System.Drawing.Point location

The location in screen coordinates to get the color for.

Returns
System.Drawing.Color

The color of the pixed at the specified location.

GetImageFormat(Image)

Declaration
public static ImageFormat GetImageFormat(Image img)
Parameters
System.Drawing.Image img

Returns
System.Drawing.Imaging.ImageFormat

GetStreamFromResource(Assembly, String)

Declaration
public static Stream GetStreamFromResource(Assembly assembly, string resourceUri)
Parameters
System.Reflection.Assembly assembly

System.String resourceUri

Returns
System.IO.Stream

GetThemeName(String)

Gets the actual theme name in use. The theme is set with the following priority:

  1. ThemeResolutionService.ApplicationThemeName
  2. RadControl.ThemeName - it is passed as the method parameter
  3. ThemeResolutionService.ControlDefaultThemeName
Declaration
public static string GetThemeName(string controlThemeName)
Parameters
System.String controlThemeName

Returns
System.String

GetThemeName(RadElement)

Gets the actual theme used by the passed RadElement.

Declaration
public static string GetThemeName(RadElement element)
Parameters
RadElement element

Returns
System.String

ImageFromString(String)

Converts a base64-encoded string to a System.Drawing.Image object.

Declaration
public static Image ImageFromString(string encodedImage)
Parameters
System.String encodedImage

The base64-encoded string representation of an image.

Returns
System.Drawing.Image

A System.Drawing.Image object created from the encoded string, or null if the input string is null or empty.

Remarks

This method decodes a base64 string and creates an Image object from the resulting byte array. It handles various pixel formats and applies appropriate transformations:

  • For 24bpp RGB images, creates a bitmap and makes magenta transparent
  • For GIF images, returns the image as-is
  • For other formats, converts to 32bpp ARGB format for better transparency support

The method properly disposes of intermediate resources to prevent memory leaks.

Exceptions
System.FormatException

Thrown when the input string is not a valid base64 string.

System.ArgumentException

Thrown when the decoded data does not represent a valid image format.

ImageToString(Image)

Converts a System.Drawing.Image object to a base64-encoded string representation.

Declaration
public static string ImageToString(Image image)
Parameters
System.Drawing.Image image

The image to convert to a string representation.

Returns
System.String

A base64-encoded string representing the image, or an empty string if the input image is null.

Remarks

This method serializes an image to a base64 string that can be stored or transmitted as text. The method preserves the original image format when possible:

  • GIF images are saved in their original GIF format
  • Other image types are converted to PNG format for better quality and transparency support

The resulting string can be converted back to an image using the ImageFromString(String) method. All intermediate resources are properly disposed to prevent memory leaks.

See Also
ImageFromString(String)

IsBottomAligned(ContentAlignment)

Declaration
[Obsolete("Use LayoutUtils.IsBottomAlignment(align) method instead. This method will be removed in 2026 Q2.")]
public static bool IsBottomAligned(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment align

Returns
System.Boolean

IsCompatibleDataSource()

Declaration
public static bool IsCompatibleDataSource()
Returns
System.Boolean

IsDarkTheme(String)

Declaration
public static bool IsDarkTheme(string themeName)
Parameters
System.String themeName

Returns
System.Boolean

IsInteger(Type)

Declaration
public static bool IsInteger(Type type)
Parameters
System.Type type

Returns
System.Boolean

IsMaterialTheme(String)

Declaration
public static bool IsMaterialTheme(string themeName)
Parameters
System.String themeName

Returns
System.Boolean

IsMetroTouchTheme(String)

Declaration
public static bool IsMetroTouchTheme(string themeName)
Parameters
System.String themeName

Returns
System.Boolean

IsNumericType(Type)

Declaration
public static bool IsNumericType(Type type)
Parameters
System.Type type

Returns
System.Boolean

IsPseudoMnemonic(Char, String)

Declaration
protected static bool IsPseudoMnemonic(char charCode, string text)
Parameters
System.Char charCode

System.String text

Returns
System.Boolean

IsRightAligned(ContentAlignment)

Declaration
[Obsolete("Use LayoutUtils.IsRightAlignment(align) method instead. This member will be removed in 2026 Q2.")]
public static bool IsRightAligned(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment align

Returns
System.Boolean

KeyCodeToUnicode(Keys)

Converts a key to string taking into account the currently selected keyboard layout.

Declaration
public static string KeyCodeToUnicode(Keys key)
Parameters
System.Windows.Forms.Keys key

The key to convert.

Returns
System.String

The string mapped to the provided key.

MirrorRotateFlipType(RotateFlipType)

Declaration
public static RotateFlipType MirrorRotateFlipType(RotateFlipType rotateFlip)
Parameters
System.Drawing.RotateFlipType rotateFlip

Returns
System.Drawing.RotateFlipType

PerformCenteredRotation(ref RadMatrix, RectangleF, Single)

Declaration
public static RectangleF PerformCenteredRotation(ref RadMatrix matrix, RectangleF bounds, float angle)
Parameters
RadMatrix matrix

System.Drawing.RectangleF bounds

System.Single angle

Returns
System.Drawing.RectangleF

PerformTopLeftRotation(ref RadMatrix, RectangleF, Single)

Declaration
public static RectangleF PerformTopLeftRotation(ref RadMatrix matrix, RectangleF bounds, float angle)
Parameters
RadMatrix matrix

System.Drawing.RectangleF bounds

System.Single angle

Returns
System.Drawing.RectangleF

ProcessStart(String)

Declaration
public static void ProcessStart(string fileName)
Parameters
System.String fileName

ProcessStart(String, Boolean)

Declaration
public static void ProcessStart(string fileName, bool useShellExecute)
Parameters
System.String fileName

System.Boolean useShellExecute

ResizeImage(Image, Size)

Resizes an image to a new size.

Declaration
public static Image ResizeImage(Image source, Size size)
Parameters
System.Drawing.Image source

The source image to resize.

System.Drawing.Size size

The new size which will be used to resize the image.

Returns
System.Drawing.Image

A new resized image.

SetDropShadow(IntPtr)

Declaration
public static void SetDropShadow(IntPtr hWnd)
Parameters
System.IntPtr hWnd

StringFormatForAlignment(ContentAlignment)

Creates a StringFormat object configured for the specified content alignment.

Declaration
public static StringFormat StringFormatForAlignment(ContentAlignment align)
Parameters
System.Drawing.ContentAlignment align

The content alignment to configure the StringFormat for.

Returns
System.Drawing.StringFormat

A StringFormat object with Alignment and LineAlignment properties set according to the specified ContentAlignment.

Remarks

This method translates WinForms ContentAlignment values to appropriate StringFormat alignment settings for text drawing operations. The returned StringFormat can be used with GDI+ text drawing methods to achieve the desired text alignment.

StringIsNullOrWhiteSpace(String)

Declaration
public static bool StringIsNullOrWhiteSpace(string str)
Parameters
System.String str

Returns
System.Boolean

SvgImageFromString(String)

Creates a RadSvgImage object from XML string.

Declaration
public static RadSvgImage SvgImageFromString(string svgXml)
Parameters
System.String svgXml

The XML representing the SVG image.

Returns
RadSvgImage

The created RadSvgImage object.

SvgImageToString(RadSvgImage)

Converts a RadSvgImage object to a XML string.

Declaration
public static string SvgImageToString(RadSvgImage svgImage)
Parameters
RadSvgImage svgImage

The RadSvgImage object.

Returns
System.String

TextWithoutMnemonics(String)

Declaration
public static string TextWithoutMnemonics(string text)
Parameters
System.String text

Returns
System.String

TransformPoints(Point[], Single[])

Declaration
public static void TransformPoints(Point[] points, float[] elements)
Parameters
System.Drawing.Point[] points

System.Single[] elements

TransformPoints(PointF[], Single[])

Declaration
public static void TransformPoints(PointF[] points, float[] elements)
Parameters
System.Drawing.PointF[] points

System.Single[] elements

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.