New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public class PasteOptionsPopup : MiniToolBarBase, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IThemeChangeListener, IPasteOptionsPopup

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormShapedFormMiniToolBarBasePasteOptionsPopup...

Implements: IBindableComponentIComponentIContainerControlIDisposableIDropTargetIPasteOptionsPopupISynchronizeInvokeIThemeChangeListenerIWin32Window...

Inherited Members MiniToolBarBase.radRichTextBoxMiniToolBarBase.ShowPopup(Point, RadRichTextBox)MiniToolBarBase.SetOpacity(double)MiniToolBarBase.Dispose(bool)MiniToolBarBase.IsPopupOpenShapedForm.OnThemeChanged(ThemeChangedEventArgs)ShapedForm.SetBoundsCore(int, int, int, int, BoundsSpecified)ShapedForm.SetClientSizeCore(int, int)ShapedForm.OnLoad(EventArgs)ShapedForm.OnShown(EventArgs)ShapedForm.OnPaintBackground(PaintEventArgs)ShapedForm.OnSizeChanged(EventArgs)ShapedForm.WndProc(ref Message)ShapedForm.ApplicationThemeChanged(object, ThemeChangedEventArgs)ShapedForm.ScaleControl(SizeF, BoundsSpecified)ShapedForm.OnResizeBegin(EventArgs)ShapedForm.OnResizeEnd(EventArgs)ShapedForm.OnMove(EventArgs)ShapedForm.PaintFrame(Graphics)ShapedForm.PaintBorder(Graphics)ShapedForm.GetHitTest(Point)ShapedForm.ApplyTheme(string)ShapedForm.ApplyShape()ShapedForm.IsRectangularShape(ref int)ShapedForm.CreateBorderPath()ShapedForm.LOWORD(int)ShapedForm.ShapedControlShapedForm.WindowsSettingsShapedForm.BackColorShapedForm.BorderColorShapedForm.BorderWidthShapedForm.ForeColorShapedForm.FontShapedForm.BorderAlignmentShapedForm.AllowResizeShapedForm.ShapeShapedForm.ThemeNameShapedForm.EnableCompositionOnVistaShapedForm.CreateParamsShapedForm.FormBorderStyleShapedForm.ControlThemeClassNameShapedForm.BorderPathShapedForm.OuterPathForm.SetVisibleCore(bool)Form.Activate()Form.ActivateMdiChild(Form)Form.AddOwnedForm(Form)Form.AdjustFormScrollbars(bool)Form.Close()Form.CreateControlsInstance()Form.CreateHandle()Form.DefWndProc(ref Message)Form.ProcessMnemonic(char)Form.CenterToParent()Form.CenterToScreen()Form.LayoutMdi(MdiLayout)Form.OnActivated(EventArgs)Form.OnBackgroundImageChanged(EventArgs)Form.OnBackgroundImageLayoutChanged(EventArgs)Form.OnClosing(CancelEventArgs)Form.OnClosed(EventArgs)Form.OnFormClosing(FormClosingEventArgs)Form.OnFormClosed(FormClosedEventArgs)Form.OnCreateControl()Form.OnDeactivate(EventArgs)Form.OnEnabledChanged(EventArgs)Form.OnEnter(EventArgs)Form.OnFontChanged(EventArgs)Form.OnHandleCreated(EventArgs)Form.OnHandleDestroyed(EventArgs)Form.OnHelpButtonClicked(CancelEventArgs)Form.OnLayout(LayoutEventArgs)Form.OnMaximizedBoundsChanged(EventArgs)Form.OnMaximumSizeChanged(EventArgs)Form.OnMinimumSizeChanged(EventArgs)Form.OnInputLanguageChanged(InputLanguageChangedEventArgs)Form.OnInputLanguageChanging(InputLanguageChangingEventArgs)Form.OnVisibleChanged(EventArgs)Form.OnMdiChildActivate(EventArgs)Form.OnMenuStart(EventArgs)Form.OnMenuComplete(EventArgs)Form.OnPaint(PaintEventArgs)Form.OnResize(EventArgs)Form.OnDpiChanged(DpiChangedEventArgs)Form.OnGetDpiScaledSize(int, int, ref Size)Form.OnRightToLeftLayoutChanged(EventArgs)Form.OnTextChanged(EventArgs)Form.ProcessCmdKey(ref Message, Keys)Form.ProcessDialogKey(Keys)Form.ProcessDialogChar(char)Form.ProcessKeyPreview(ref Message)Form.ProcessTabKey(bool)Form.RemoveOwnedForm(Form)Form.Select(bool, bool)Form.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Form.SetDesktopBounds(int, int, int, int)Form.SetDesktopLocation(int, int)Form.Show(IWin32Window)Form.ShowDialog()Form.ShowDialog(IWin32Window)Form.ToString()Form.UpdateDefaultButton()Form.OnStyleChanged(EventArgs)Form.ValidateChildren()Form.ValidateChildren(ValidationConstraints)Form.AcceptButtonForm.ActiveFormForm.ActiveMdiChildForm.AllowTransparencyForm.AutoScrollForm.AutoSizeForm.AutoSizeModeForm.AutoValidateForm.CancelButtonForm.ClientSizeForm.ControlBoxForm.DefaultImeModeForm.DefaultSizeForm.DesktopBoundsForm.DesktopLocationForm.DialogResultForm.HelpButtonForm.IconForm.IsMdiChildForm.IsMdiContainerForm.IsRestrictedWindowForm.KeyPreviewForm.LocationForm.MaximizedBoundsForm.MaximumSizeForm.MainMenuStripForm.MenuForm.MinimumSizeForm.MaximizeBoxForm.MdiChildrenForm.MdiParentForm.MergedMenuForm.MinimizeBoxForm.ModalForm.OpacityForm.OwnedFormsForm.OwnerForm.RestoreBoundsForm.RightToLeftLayoutForm.ShowInTaskbarForm.ShowIconForm.ShowWithoutActivationForm.SizeForm.SizeGripStyleForm.StartPositionForm.TextForm.TopLevelForm.TopMostForm.TransparencyKeyForm.WindowStateForm.AutoSizeChangedForm.AutoValidateChangedForm.HelpButtonClickedForm.MaximizedBoundsChangedForm.MaximumSizeChangedForm.MinimumSizeChangedForm.ActivatedForm.DeactivateForm.FormClosingForm.FormClosedForm.LoadForm.MdiChildActivateForm.MenuCompleteForm.MenuStartForm.InputLanguageChangedForm.InputLanguageChangingForm.RightToLeftLayoutChangedForm.ShownForm.DpiChangedForm.ResizeBeginForm.ResizeEnd...

Constructors

Initializes a new instance of the PasteOptionsPopup class.

C#
public PasteOptionsPopup()

Fields

Determines whether UnwireEvents() removes the popup's event handlers.

C#
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.

C#
protected DocumentPosition currentCaretPosition

The initial size used to measure the popup before applying theme-specific content dimensions.

C#
protected readonly Size popupLayoutSize

Properties

Gets the drop-down button control inside the popup.

C#
public RadDropDownButton DropDownButton { get; }

Gets the menu item holding the paste options buttons.

C#
public RadMenuPasteOptionsToggleItem PasteOptionsPicker { get; }

Methods

Calculates a location below the captured caret position in the specified editor.

C#
protected virtual Point CalculatePopupLocation(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox

The editor whose active presenter maps the caret position.

Returns:

Point

The popup location relative to the editor.

Creates the header and paste-option selector items hosted by the popup.

C#
protected virtual RadItemCollection GetPasteOptiopnsItems()
Returns:

RadItemCollection

A collection containing the popup's menu items.

Converts an editor-relative location to screen coordinates.

C#
protected virtual Point GetScreenPopupLocation(Point location)
Parameters:locationPoint

The location relative to the editor.

Returns:

Point

The screen location, or Empty when the editor or its control tree is unavailable.

Hides the popup with the paste options items.

C#
public void Hide(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox

The RadRichTextBox object executing the PasteOptions logic.

Resets the selected paste option and unwires the popup after the base popup is hidden.

C#
protected override void HidePopup()

Overrides: MiniToolBarBase.HidePopup()

Returns focus to the editor after its paste-options drop-down closes.

C#
protected virtual void OnDropDownMenuPopupClosed(object sender, EventArgs args)
Parameters:senderobject

The drop-down menu that closed.

argsEventArgs

The event data.

Applies the paste option associated with a supported keyboard shortcut.

C#
protected virtual void OnPasteOptionsDropDownButtonKeyDown(object sender, KeyEventArgs e)
Parameters:senderobject

The drop-down button that received the key.

eKeyEventArgs

The 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.

C#
public void Show(Point location, RadRichTextBox richTextBox)
Parameters:locationPoint

The location at which the popup will be shown.

richTextBoxRadRichTextBox

The RadRichTextBox object executing the PasteOptions logic.

Attaches the Popup to the given RichTextBox and initializes its content.

C#
public void Show(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox

The RadRichTextBox object executing the PasteOptions logic.

Implements: IPasteOptionsPopup.Show(RadRichTextBox)

Applies the owning control's theme to the popup and updates its measured size when the theme changes.

C#
protected virtual void SyncTheme()

Removes editor, parent-form, and popup-button handlers when event unwiring is enabled.

C#
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.

C#
protected virtual void UpdateDropDownButtonIcon(string themeName)
Parameters:themeNamestring

The theme whose icon palette is applied.

Recalculates the popup location from the editor's captured caret position.

C#
protected virtual void UpdatePopupLocation()

Moves the popup to an editor-relative location converted to screen coordinates.

C#
protected virtual void UpdatePopupLocation(Point location)
Parameters:locationPoint

The desired location relative to the editor.

Subscribes to editor, form, and popup events used to reposition or close the popup.

C#
protected virtual void WireEvents()