PasteOptionsPopup
Represets a popup control with special placement rules that is used for hosting the PasteOptions UI.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class PasteOptionsPopup : MiniToolBarBase, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IThemeChangeListener, IPasteOptionsPopup
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormShapedFormMiniToolBarBasePasteOptionsPopup...
Implements:
Inherited Members
Constructors
Initializes a new instance of the PasteOptionsPopup class.
public PasteOptionsPopup()
Fields
Determines whether UnwireEvents() removes the popup's event handlers.
protected bool canUnwireEvents
The popup disables unwiring while it is temporarily hidden for printing or when it moves outside the active presenter.
The document position captured for calculating and updating the popup location.
protected DocumentPosition currentCaretPosition
The initial size used to measure the popup before applying theme-specific content dimensions.
protected readonly Size popupLayoutSize
Properties
Gets the drop-down button control inside the popup.
public RadDropDownButton DropDownButton { get; }
Gets the menu item holding the paste options buttons.
public RadMenuPasteOptionsToggleItem PasteOptionsPicker { get; }
Methods
Calculates a location below the captured caret position in the specified editor.
protected virtual Point CalculatePopupLocation(RadRichTextBox richTextBox)
The editor whose active presenter maps the caret position.
Returns:The popup location relative to the editor.
Creates the header and paste-option selector items hosted by the popup.
protected virtual RadItemCollection GetPasteOptiopnsItems()
A collection containing the popup's menu items.
Hides the popup with the paste options items.
public void Hide(RadRichTextBox richTextBox)
The RadRichTextBox object executing the PasteOptions logic.
Resets the selected paste option and unwires the popup after the base popup is hidden.
protected override void HidePopup()
Overrides:
Applies the paste option associated with a supported keyboard shortcut.
protected virtual void OnPasteOptionsDropDownButtonKeyDown(object sender, KeyEventArgs e)
The drop-down button that received the key.
eKeyEventArgsThe key event data.
The handler maps K, T, M, and S to keep source formatting, keep text only, merge formatting, and use destination styles.
Shows the popup with the paste options items at the specified location.
public void Show(Point location, RadRichTextBox richTextBox)
The location at which the popup will be shown.
richTextBoxRadRichTextBoxThe RadRichTextBox object executing the PasteOptions logic.
Attaches the Popup to the given RichTextBox and initializes its content.
public void Show(RadRichTextBox richTextBox)
The RadRichTextBox object executing the PasteOptions logic.
Implements:
Applies the owning control's theme to the popup and updates its measured size when the theme changes.
protected virtual void SyncTheme()
Removes editor, parent-form, and popup-button handlers when event unwiring is enabled.
protected virtual void UnwireEvents()
No handlers are removed when canUnwireEvents is false or a parent form is unavailable. This method does not detach the ActiveDocumentEditorChanged handler subscribed by WireEvents().
Selects the drop-down button icons for the specified theme and the owner's icon-change policy.
protected virtual void UpdateDropDownButtonIcon(string themeName)
The theme whose icon palette is applied.
Recalculates the popup location from the editor's captured caret position.
protected virtual void UpdatePopupLocation()
Moves the popup to an editor-relative location converted to screen coordinates.
protected virtual void UpdatePopupLocation(Point location)
The desired location relative to the editor.
Subscribes to editor, form, and popup events used to reposition or close the popup.
protected virtual void WireEvents()