ClassTelerikUtils
Provides utility methods for Telerik RadRichTextBox.
Definition
Namespace:Telerik.Windows.Documents.Utils
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public static class TelerikUtils
Inheritance: objectTelerikUtils
Methods
EnumTryParse<TEnum>(string, bool, out TEnum)
Tries to parse the specified string representation of an enumeration value into its corresponding enum type.
Declaration
public static bool EnumTryParse<TEnum>(string valueAsString, bool ignoreCase, out TEnum value) where TEnum : struct
Parameters
valueAsString
The string representation of the enumeration value to parse.
ignoreCase
A boolean value indicating whether to ignore case during the parsing.
value
TEnum
When this method returns, contains the parsed enum value if the parsing succeeded; otherwise, the default value of the enum type.
Returns
True if the parsing was successful; otherwise, false.
EnumTryParse<TEnum>(string, out TEnum)
Tries to parse a string representation of the specified enumeration type into the corresponding enum value.
Declaration
public static bool EnumTryParse<TEnum>(string valueAsString, out TEnum value) where TEnum : struct
Parameters
valueAsString
The string representation of the enumeration value to parse.
value
TEnum
When this method returns, contains the parsed enumeration value if the parsing succeeded; otherwise, the default value of the enumeration type.
Returns
Returns true if the parsing was successful; otherwise, false.
GetResourceUri(string)
Retrieves the URI of a specified resource as a string.
Declaration
public static Uri GetResourceUri(string resource)
Parameters
resource
The name of the resource for which the URI is to be obtained.
Returns
Uri
The URI of the specified resource as a string.
Swap<T>(ref T, ref T)
Swaps the values of two parameters of the same type.
Declaration
public static void Swap<T>(ref T first, ref T second)
Parameters
first
T
The first value to be swapped.
second
T
The second value to be swapped.