Class
TelerikHelper

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class TelerikHelper

Inheritance: objectTelerikHelper

Constructors

TelerikHelper()

Declaration

cs-api-definition
public TelerikHelper()

Properties

IsNet47OrHigher

Declaration

cs-api-definition
public static bool IsNet47OrHigher { get; }

Property Value

bool

IsWindows10AnniversaryUpdateOrHigher

Declaration

cs-api-definition
public static bool IsWindows10AnniversaryUpdateOrHigher { get; }

Property Value

bool

IsWindows10CreatorsUpdateOrHigher

Declaration

cs-api-definition
public static bool IsWindows10CreatorsUpdateOrHigher { get; }

Property Value

bool

IsWindows10OrHigher

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

Declaration

cs-api-definition
public static bool IsWindows10OrHigher { get; }

Property Value

bool

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

cs-api-definition
public static bool IsWindows11 { get; }

Property Value

bool

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

cs-api-definition
public static bool IsWindows7 { get; }

Property Value

bool

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

cs-api-definition
public static bool IsWindows7OrHigher { get; }

Property Value

bool

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

cs-api-definition
public static bool IsWindows7OrLower { get; }

Property Value

bool

IsWindows8OrHigher

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

Declaration

cs-api-definition
public static bool IsWindows8OrHigher { get; }

Property Value

bool

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

cs-api-definition
public static bool IsWindows8OrLower { get; }

Property Value

bool

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, int, int)

Declaration

cs-api-definition
public static void AnimateWindow(IntPtr animatedControlHandle, int animationDuration, int dwFlags)

Parameters

animatedControlHandle

IntPtr

animationDuration

int

dwFlags

int

CanProcessMnemonic(Control)

Declaration

cs-api-definition
public static bool CanProcessMnemonic(Control control)

Parameters

control

Control

Returns

bool

CanProcessMnemonicNoRecursive(Control)

Declaration

cs-api-definition
public static bool CanProcessMnemonicNoRecursive(Control control)

Parameters

control

Control

Returns

bool

ColorMixer(GradientStyles, int, float, float, params Color[])

Declaration

cs-api-definition
public static Color ColorMixer(GradientStyles gradientStyle, int numberOfColors, float gradientPercent, float gradientPercent2, params Color[] colors)

Parameters

gradientStyle

GradientStyles

numberOfColors

int

gradientPercent

float

gradientPercent2

float

colors

Color[]

Returns

Color

ColorMixer(params Color[])

Declaration

cs-api-definition
public static Color ColorMixer(params Color[] colors)

Parameters

colors

Color[]

Returns

Color

ContainsMnemonic(string)

Declaration

cs-api-definition
public static bool ContainsMnemonic(string text)

Parameters

text

string

Returns

bool

ControlAtPoint(Point)

Declaration

cs-api-definition
public static Control ControlAtPoint(Point point)

Parameters

point

Point

Returns

Control

ControlIsReallyVisible(Control)

Declaration

cs-api-definition
public static bool ControlIsReallyVisible(Control control)

Parameters

control

Control

Returns

bool

CreateOutlineForm()

Declaration

cs-api-definition
public static Form CreateOutlineForm()

Returns

Form

CreateOutlineForm(Bitmap, Color)

Declaration

cs-api-definition
public static Form CreateOutlineForm(Bitmap image, Color color)

Parameters

image

Bitmap

color

Color

Returns

Form

CreateOutlineForm1()

Declaration

cs-api-definition
public static RadShimControl CreateOutlineForm1()

Returns

RadShimControl

CreateOutlineForm1(Bitmap, Color)

Declaration

cs-api-definition
public static RadShimControl CreateOutlineForm1(Bitmap image, Color color)

Parameters

image

Bitmap

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

cs-api-definition
public static RadControl FindRadControlParent(Control control)

Parameters

control

Control

Returns

RadControl

GetBoundingRect(Rectangle, RadMatrix)

Get bounding rectangle around rotated one.

Declaration

cs-api-definition
public static Rectangle GetBoundingRect(Rectangle rect, RadMatrix matrix)

Parameters

rect

Rectangle

Rectangle that is to be rotated

matrix

RadMatrix

Returns

Rectangle

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

GetBoundingRect(RectangleF, RadMatrix)

Declaration

cs-api-definition
public static RectangleF GetBoundingRect(RectangleF rect, RadMatrix matrix)

Parameters

rect

RectangleF

matrix

RadMatrix

Returns

RectangleF

GetColorAtPoint(Point)

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

Declaration

cs-api-definition
public static Color GetColorAtPoint(Point location)

Parameters

location

Point

The location in screen coordinates to get the color for.

Returns

Color

The color of the pixel at the specified location.

GetImageFormat(Image)

Declaration

cs-api-definition
public static ImageFormat GetImageFormat(Image img)

Parameters

img

Image

Returns

ImageFormat

GetStreamFromResource(Assembly, string)

Declaration

cs-api-definition
public static Stream GetStreamFromResource(Assembly assembly, string resourceUri)

Parameters

assembly

Assembly

resourceUri

string

Returns

Stream

GetThemeName(RadElement)

Gets the actual theme used by the passed RadElement.

Declaration

cs-api-definition
public static string GetThemeName(RadElement element)

Parameters

element

RadElement

Returns

string

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

cs-api-definition
public static string GetThemeName(string controlThemeName)

Parameters

controlThemeName

string

Returns

string

ImageFromString(string)

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

Declaration

cs-api-definition
public static Image ImageFromString(string encodedImage)

Parameters

encodedImage

string

The base64-encoded string representation of an image.

Returns

Image

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

Exceptions

FormatException

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

ArgumentException

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

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.

ImageToString(Image)

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

Declaration

cs-api-definition
public static string ImageToString(Image image)

Parameters

image

Image

The image to convert to a string representation.

Returns

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.

IsCompatibleDataSource()

Declaration

cs-api-definition
public static bool IsCompatibleDataSource()

Returns

bool

IsDarkTheme(string)

Declaration

cs-api-definition
public static bool IsDarkTheme(string themeName)

Parameters

themeName

string

Returns

bool

IsInteger(Type)

Declaration

cs-api-definition
public static bool IsInteger(Type type)

Parameters

type

Type

Returns

bool

IsMaterialTheme(string)

Declaration

cs-api-definition
public static bool IsMaterialTheme(string themeName)

Parameters

themeName

string

Returns

bool

IsMetroTouchTheme(string)

Declaration

cs-api-definition
public static bool IsMetroTouchTheme(string themeName)

Parameters

themeName

string

Returns

bool

IsNumericType(Type)

Declaration

cs-api-definition
public static bool IsNumericType(Type type)

Parameters

type

Type

Returns

bool

IsPseudoMnemonic(char, string)

Declaration

cs-api-definition
protected static bool IsPseudoMnemonic(char charCode, string text)

Parameters

charCode

char

text

string

Returns

bool

KeyCodeToUnicode(Keys)

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

Declaration

cs-api-definition
public static string KeyCodeToUnicode(Keys key)

Parameters

key

Keys

The key to convert.

Returns

string

The string mapped to the provided key.

MirrorRotateFlipType(RotateFlipType)

Declaration

cs-api-definition
public static RotateFlipType MirrorRotateFlipType(RotateFlipType rotateFlip)

Parameters

rotateFlip

RotateFlipType

Returns

RotateFlipType

PerformCenteredRotation(ref RadMatrix, RectangleF, float)

Declaration

cs-api-definition
public static RectangleF PerformCenteredRotation(ref RadMatrix matrix, RectangleF bounds, float angle)

Parameters

matrix

RadMatrix

bounds

RectangleF

angle

float

Returns

RectangleF

PerformTopLeftRotation(ref RadMatrix, RectangleF, float)

Declaration

cs-api-definition
public static RectangleF PerformTopLeftRotation(ref RadMatrix matrix, RectangleF bounds, float angle)

Parameters

matrix

RadMatrix

bounds

RectangleF

angle

float

Returns

RectangleF

ProcessStart(string)

Declaration

cs-api-definition
public static void ProcessStart(string fileName)

Parameters

fileName

string

ProcessStart(string, bool)

Declaration

cs-api-definition
public static void ProcessStart(string fileName, bool useShellExecute)

Parameters

fileName

string

useShellExecute

bool

ResizeImage(Image, Size)

Resizes an image to a new size.

Declaration

cs-api-definition
public static Image ResizeImage(Image source, Size size)

Parameters

source

Image

The source image to resize.

size

Size

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

Returns

Image

A new resized image.

SetDropShadow(IntPtr)

Declaration

cs-api-definition
public static void SetDropShadow(IntPtr hWnd)

Parameters

hWnd

IntPtr

StringFormatForAlignment(ContentAlignment)

Creates a StringFormat object configured for the specified content alignment.

Declaration

cs-api-definition
public static StringFormat StringFormatForAlignment(ContentAlignment align)

Parameters

align

ContentAlignment

The content alignment to configure the StringFormat for.

Returns

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.

SvgImageFromString(string)

Creates a RadSvgImage object from XML string.

Declaration

cs-api-definition
public static RadSvgImage SvgImageFromString(string svgXml)

Parameters

svgXml

string

The XML representing the SVG image.

Returns

RadSvgImage

The created RadSvgImage object.

SvgImageToString(RadSvgImage)

Converts a RadSvgImage object to a XML string.

Declaration

cs-api-definition
public static string SvgImageToString(RadSvgImage svgImage)

Parameters

svgImage

RadSvgImage

The RadSvgImage object.

Returns

string

TextWithoutMnemonics(string)

Declaration

cs-api-definition
public static string TextWithoutMnemonics(string text)

Parameters

text

string

Returns

string

TransformPoints(PointF[], float[])

Declaration

cs-api-definition
public static void TransformPoints(PointF[] points, float[] elements)

Parameters

points

PointF[]

elements

float[]

TransformPoints(Point[], float[])

Declaration

cs-api-definition
public static void TransformPoints(Point[] points, float[] elements)

Parameters

points

Point[]

elements

float[]

In this article
DefinitionConstructorsTelerikHelper()PropertiesIsNet47OrHigherIsWindows10AnniversaryUpdateOrHigherIsWindows10CreatorsUpdateOrHigherIsWindows10OrHigherIsWindows11IsWindows7IsWindows7OrHigherIsWindows7OrLowerIsWindows8OrHigherIsWindows8OrLowerMethodsAnimateWindow(IntPtr, int, int)CanProcessMnemonic(Control)CanProcessMnemonicNoRecursive(Control)ColorMixer(GradientStyles, int, float, float, params Color[])ColorMixer(params Color[])ContainsMnemonic(string)ControlAtPoint(Point)ControlIsReallyVisible(Control)CreateOutlineForm()CreateOutlineForm(Bitmap, Color)CreateOutlineForm1()CreateOutlineForm1(Bitmap, Color)FindRadControlParent(Control)GetBoundingRect(Rectangle, RadMatrix)GetBoundingRect(RectangleF, RadMatrix)GetColorAtPoint(Point)GetImageFormat(Image)GetStreamFromResource(Assembly, string)GetThemeName(RadElement)GetThemeName(string)ImageFromString(string)ImageToString(Image)IsCompatibleDataSource()IsDarkTheme(string)IsInteger(Type)IsMaterialTheme(string)IsMetroTouchTheme(string)IsNumericType(Type)IsPseudoMnemonic(char, string)KeyCodeToUnicode(Keys)MirrorRotateFlipType(RotateFlipType)PerformCenteredRotation(ref RadMatrix, RectangleF, float)PerformTopLeftRotation(ref RadMatrix, RectangleF, float)ProcessStart(string)ProcessStart(string, bool)ResizeImage(Image, Size)SetDropShadow(IntPtr)StringFormatForAlignment(ContentAlignment)SvgImageFromString(string)SvgImageToString(RadSvgImage)TextWithoutMnemonics(string)TransformPoints(PointF[], float[])TransformPoints(Point[], float[])
Not finding the help you need?
Contact Support