Formatting clipboard text

SfMaskedEdit allows you to format the clipboard text in a mask scenario (when the Mask property is set). When you perform the cut or copy operation, the clipboard text will be formatted with your input characters and the literals defined in the mask. You can modify this and allow the clipboard to hold the characters with or without prompt and literals by setting the CutCopyMaskFormat property of the control. The clipboard text is formatted by any one of the following formatting enum values:

  • ExcludePromptAndLiterals
  • IncludePrompt
  • IncludeLiterals
  • IncludePromptAndLiterals

ExcludePromptAndLiterals

Clipboard text will contain only the typed characters, the prompt characters and literals are excluded.

SfMaskedEdit maskedEdit = new SfMaskedEdit();
maskedEdit.Mask = "00/00/0000";
maskedEdit.CutCopyMaskFormat = MaskFormat.ExcludePromptAndLiterals;

IncludePrompt

Clipboard text contains the typed characters and prompt characters, literals are excluded.

SfMaskedEdit maskedEdit = new SfMaskedEdit();
maskedEdit.Mask = "00/00/0000";
maskedEdit.CutCopyMaskFormat = MaskFormat.IncludePrompt;

IncludeLiterals

Clipboard text contains the typed characters and literals, prompt characters are excluded.

SfMaskedEdit maskedEdit = new SfMaskedEdit();
maskedEdit.Mask = "00/00/0000";
maskedEdit.CutCopyMaskFormat = MaskFormat.IncludeLiterals;

IncludePromptAndLiterals

Clipboard text contains typed characters, prompt characters, and literals.

SfMaskedEdit maskedEdit = new SfMaskedEdit();
maskedEdit.Mask = "00/00/0000";
maskedEdit.CutCopyMaskFormat = MaskFormat.IncludePromptAndLiterals;