Class ClipboardEx
A class providing additional methods for working with the clipboard.
Inheritance
Namespace: Telerik.Windows.Documents.Base
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public static class ClipboardEx : Object
Properties
ClipboardHandlers
Collection of Clipboard
Declaration
public static List<ClipboardHandler> ClipboardHandlers { get; }
Property Value
System. The clipboard handlers. |
Methods
ContainsDocument()
Determines whether the clipboard contains supported rich-text data.
Declaration
public static bool ContainsDocument()
Returns
System.
|
ContainsDocument(KeyEventArgs)
Determines whether the clipboard contains supported rich-text data.
Declaration
public static bool ContainsDocument(KeyEventArgs pasteKeyEventArgs)
Parameters
System. The System. |
Returns
System.
|
ContainsText(KeyEventArgs)
Determines whether the clipboard contains plain text.
Declaration
public static bool ContainsText(KeyEventArgs pasteKeyEventArgs)
Parameters
System. The System. |
Returns
System.
|
GetDocument()
Obtains a Document
Declaration
public static DocumentFragment GetDocument()
Returns
Document a Document |
GetDocument(out Nullable<PasteSource>)
Obtains a Document
Declaration
public static DocumentFragment GetDocument(out Nullable<PasteSource> pasteSource)
Parameters
System. The Paste |
Returns
Document a Document |
GetDocumentFromClipboard(String, Func<String, String>)
Gets a Document
Declaration
public static DocumentFragment GetDocumentFromClipboard(string dataFormat, Func<string, string> clipboardStringFilter = null)
Parameters
System. The data format. You can use the set of formats provided in the System. |
System. A function to filter the string inside the clipboard. This function is used when the content needs to be formatted additionally before creating a document from it. HTML content inserted by MS Word can be stripped using Strip |
Returns
Document A Document |
GetDocumentFromClipboard(String, out Nullable<PasteSource>, Func<String, String>)
Gets a Document
Declaration
public static DocumentFragment GetDocumentFromClipboard(string dataFormat, out Nullable<PasteSource> pasteSource, Func<string, string> clipboardStringFilter = null)
Parameters
System. The data format. You can use the set of formats provided in the System. |
System. The Paste |
System. A function to filter the string inside the clipboard. This function is used when the content needs to be formatted additionally before creating a document from it. HTML content inserted by MS Word can be stripped using Strip |
Returns
Document A Document |
GetDocumentFromClipboard(String, String, Func<String, String>)
Gets a Document
Declaration
public static DocumentFragment GetDocumentFromClipboard(string dataFormat, string formatExtension, Func<string, string> clipboardStringFilter = null)
Parameters
System. The data format. You can use the set of formats provided in the System. |
System. This parameter is not used. |
System. A function to filter the string inside the clipboard. This function is used when the content needs to be formatted additionally before creating a document from it. |
Returns
Document A Document |
GetText()
Gets the clipboard data of type System.
Declaration
public static string GetText()
Returns
System. The string representing the content or System. |
GetText(KeyEventArgs)
Gets the clipboard data of type System.
Declaration
public static string GetText(KeyEventArgs e)
Parameters
System. The System. |
Returns
System. The string representing the content or System. |
SetDataObject(IDataObject)
Places a specified data object in the system Clipboard.
Declaration
public static void SetDataObject(IDataObject dataObject)
Parameters
System. A data object (an object that implements System. |
SetDocument(DocumentFragment)
Sets a document represented by a Document
Declaration
public static void SetDocument(DocumentFragment documentFragment)
Parameters
Document The document fragment. |
SetDocument(DocumentFragment, IDataObject)
Sets a document represented by a Document
Declaration
public static void SetDocument(DocumentFragment documentFragment, IDataObject dataObject)
Parameters
Document The document fragment. |
System. The object the document fragment should be inserted into. |
SetText(String)
Stores System.
Declaration
public static void SetText(string textData)
Parameters
System. The text data. |
SetText(String, DataObject)
Stores System.
Declaration
public static void SetText(string textData, DataObject dataObject)
Parameters
System. The string representing the text data. |
System. The data object. |
SetText(KeyEventArgs, String)
Stores System.
Declaration
public static void SetText(KeyEventArgs e, string textData)
Parameters
System. The System. |
System. The text data. |
SetText(KeyEventArgs, String, DataObject)
Stores System.
Declaration
public static void SetText(KeyEventArgs e, string textData, DataObject dataObject)
Parameters
System. The System. |
System. The string representing the text data. |
System. The data object. |
StripHtmlClipboardFormatHeaders(String)
Strips the clipboard format headers from the HTML content inserted in the clipboard by MS Word. Skips all lines in the beginning containing ':'.
Declaration
public static string StripHtmlClipboardFormatHeaders(string clipboardText)
Parameters
System. The clipboard text. |
Returns
System. The stripped HTML string. |