New to Telerik UI for WPFStart a free 30-day trial

Provides utility methods for Telerik RadRichTextBox.

Definition

Namespace:Telerik.Windows.Documents.Utils

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public static class TelerikUtils

Inheritance: objectTelerikUtils

Methods

Tries to parse the specified string representation of an enumeration value into its corresponding enum type.

C#
public static bool EnumTryParse<TEnum>(string valueAsString, bool ignoreCase, out TEnum value) where TEnum : struct
Parameters:valueAsStringstring

The string representation of the enumeration value to parse.

ignoreCasebool

A boolean value indicating whether to ignore case during the parsing.

valueTEnum

When this method returns, contains the parsed enum value if the parsing succeeded; otherwise, the default value of the enum type.

Returns:

bool

True if the parsing was successful; otherwise, false.

Tries to parse a string representation of the specified enumeration type into the corresponding enum value.

C#
public static bool EnumTryParse<TEnum>(string valueAsString, out TEnum value) where TEnum : struct
Parameters:valueAsStringstring

The string representation of the enumeration value to parse.

valueTEnum

When this method returns, contains the parsed enumeration value if the parsing succeeded; otherwise, the default value of the enumeration type.

Returns:

bool

Returns true if the parsing was successful; otherwise, false.

Retrieves the URI of a specified resource as a string.

C#
public static Uri GetResourceUri(string resource)
Parameters:resourcestring

The name of the resource for which the URI is to be obtained.

Returns:

Uri

The URI of the specified resource as a string.

C#
public static bool IsInDesignMode()
Returns:

bool

Swaps the values of two parameters of the same type.

C#
public static void Swap<T>(ref T first, ref T second)
Parameters:firstT

The first value to be swapped.

secondT

The second value to be swapped.