Base for editor elements that create, position, and synchronize a popup form with the host control.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class PopupEditorBaseElement : EditorBaseElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IInputEditor, IValueEditor, ISupportInitialize
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadEditorElementEditorBaseElementPopupEditorBaseElement...
Derived Classes:
Implements:
Inherited Members
Constructors
protected PopupEditorBaseElement()
Properties
Gets whether focus is within the host control or, while open, within the popup form.
[Browsable(false)]
public bool EditorContainsFocus { get; }
Gets whether the popup form exists and is registered with Default.
[Browsable(false)]
public virtual bool IsPopupOpen { get; }
public int OwnerOffset { get; set; }
Methods
Applies the host control's theme to a popup, falling back to the default theme when the host has no theme name; refreshes popup layout if its root is loaded.
public static void ApplyThemeToPopup(RadElementTree elementTree, RadPopupControlBase popup)
The host element tree whose theme should be used.
popupRadPopupControlBaseThe popup whose theme is updated.
Syncronizes the theme of the editor itself with the popup that is about to be displayed.
protected virtual void ApplyThemeToPopup(RadPopupControlBase popup)
Determines whether the popup form may be displayed.
Closes the popup with a RadPopupCloseReason.CloseCalled reason.
public virtual void ClosePopup()
Closes the popup with the provided reason for closing.
public virtual void ClosePopup(RadPopupCloseReason reason)
the reason for the close operation as specified through RadPopupCloseReason enumeration.
Gets the size of the ControlBoundingRectangle.
Creates the popup instance. You have to override this method in order to provide a popup that is specialized by its content. Example: In a combo box you have to override and provide a specialized class that contains and handles the listbox element.
protected virtual RadPopupControlBase CreatePopupForm()
The popup instance.
Closes an open popup, disposes its form, and then releases the base editor resources.
protected override void DisposeManagedResources()
Overrides:
Unhooks and disposes the current popup form, if one has been created.
protected void DisposePopupForm()
Unhooks and disposes the current popup form. The base implementation disposes it regardless of the dispose value.
protected virtual void DisposePopupFormCore(bool dispose)
A disposal flag supplied to the hook; it does not alter the base implementation's disposal behavior.
Used to initialize the size of the popup when it is initially opened and the element tree is loaded.
Gets a valid instance of the popup, that is properly initialized to work with the PopupEditorBaseElement.
protected virtual RadPopupControlBase GetPopupForm()
The popup instance.
Gets the screen coordinated where the popup should be displayed.
protected virtual Point GetPopupLocation(RadPopupControlBase popup)
Gets the display size for the popup.
protected virtual Size GetPopupSize(RadPopupControlBase popup, bool measure)
The popup which size should be retrieved.
measureboolTrue to perform explicit measure, false otherwise.
Returns:Toggles the popup for Alt+Down unless the key event is already handled, then marks the toggle event handled.
Called when a mouse button is pressed down over the item.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments.
Overrides:
Raises PopupClosed after the popup is removed from the popup manager. If fade-out is enabled, the animation may still be running.
protected virtual void OnPopupClosed(RadPopupClosedEventArgs e)
The popup-closed event data.
Raises PopupClosing before the popup closes; handlers can cancel the operation through Cancel.
protected virtual void OnPopupClosing(RadPopupClosingEventArgs e)
The popup-closing event data.
Raises PopupOpened after the popup opens.
protected virtual void OnPopupOpened(EventArgs args)
The event data supplied by the popup.
Raises PopupOpening before the popup opens, allowing subscribers to cancel the operation.
protected virtual void OnPopupOpening(CancelEventArgs e)
The cancellation state for the opening operation.
Propagates binding-context changes to the popup form after the base property-change notification. Accessing the form creates it on demand while this element is not disposed.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The changed property and its old and new values.
Overrides:
Closes the popup for a Tab key and processes the dialog key only if the popup is no longer open.
protected virtual void ProcessPopupTabKey(KeyEventArgs e)
The key event data.
Displays the popup on the screen.
public virtual void ShowPopup()
Performs the core popup display logic.
protected virtual void ShowPopupCore(RadPopupControlBase popup)
The popup form that is about to be displayed.
Closes the popup if it is open, or shows the popup if it is closed.
protected virtual void TooglePopupState()
Provides a hook for subclasses to detach handlers before the popup form is disposed.
protected virtual void UnwirePopupFormEvents(RadPopupControlBase popup)
The popup form whose events should be unwired.
Applies any Min/Max size restrictions to the popup form.
protected virtual void UpdatePopupMinMaxSize(RadPopupControlBase popup)
Provides a hook for subclasses to attach handlers to a newly created popup form.
protected virtual void WirePopupFormEvents(RadPopupControlBase popup)
The popup form whose events can be wired.
Events
Occurs after the popup is removed from the popup manager. If fade-out is enabled, its animation may still be running.
public virtual event RadPopupClosedEventHandler PopupClosed
Occurs before the popup closes; set Cancel to keep it open.
public virtual event RadPopupClosingEventHandler PopupClosing
Occurs after the popup has opened.
public virtual event EventHandler PopupOpened
Occurs before the popup opens; set Cancel to prevent it from opening.
public virtual event CancelEventHandler PopupOpening