PopupEditorElement
Represents a popup editor element that provides dropdown functionality with list-based item selection and auto-complete features for data entry controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class PopupEditorElement : PopupEditorBaseElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IInputEditor, IValueEditor, ISupportInitialize
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadEditorElementEditorBaseElementPopupEditorBaseElementPopupEditorElement...
Derived Classes:
Implements:
Inherited Members
Constructors
public PopupEditorElement()
Properties
Gets or sets the data source object that provides data items for the auto-complete suggest functionality.
public virtual object AutoCompleteDataSource { get; set; }
Gets or sets the property name of the data source that serves as the display member for auto-complete functionality.
public virtual string AutoCompleteDisplayMember { get; set; }
Gets or sets the property name of the data source that serves as the value member for auto-complete functionality.
public virtual string AutoCompleteValueMember { get; set; }
Gets or sets the default number of items to display in the dropdown when the total item count exceeds this value.
public virtual int DefaultItemsCountInDropDown { get; set; }
Gets or sets the height in pixels of the dropdown portion of the popup editor, with automatic DPI scaling applied.
[Browsable(true)]
public virtual int DropDownHeight { get; set; }
Gets or sets the maximum size constraints for the dropdown popup, automatically adjusting minimum size if conflicts arise.
[Browsable(true)]
public virtual Size DropDownMaxSize { get; set; }
Gets or sets the minimum size constraints for the dropdown popup, automatically adjusting maximum size if conflicts arise.
[Browsable(true)]
public virtual Size DropDownMinSize { get; set; }
Gets or sets the RadListElement that hosts the selectable items within the popup dropdown.
public RadListElement ListElement { get; set; }
Gets or sets the maximum number of items to be displayed in the dropdown portion of the popup editor. When set to 0, all items are shown.
public virtual int MaxDropDownItems { get; set; }
Gets or sets the popup control base that hosts the dropdown content, creating it lazily when first accessed.
public virtual RadEditorPopupControlBase Popup { get; set; }
Methods
Creates child elements including the RadListElement and wires up event handlers for popup functionality.
protected override void CreateChildElements()
Overrides:
Disposes managed resources by unwiring event handlers and calling the base dispose implementation.
protected override void DisposeManagedResources()
Overrides:
Calculates the optimal size for the popup based on item count, sizing constraints, and available space.
protected override Size GetPopupSize(RadPopupControlBase popup, bool measure)
The RadPopupControlBase for which to calculate the size.
measureboolTrue to force measurement of elements; false to use cached measurements.
Returns:The calculated Size for the popup.
Overrides:
Initializes the element's fields and ensures the binding context property is available for property change notifications.
protected override void InitializeFields()
Overrides:
Handles data item property changes in the list element, allowing derived classes to respond to property modifications.
protected virtual void listElement_DataItemPropertyChanged(object sender, RadPropertyChangedEventArgs e)
The source of the event.
eRadPropertyChangedEventArgsThe RadPropertyChangedEventArgs containing event data.
Notifies the owner control about popup editor events and data changes through the specified notification data.
public virtual void NotifyOwner(PopupEditorNotificationData notificationData)
The PopupEditorNotificationData containing information about the event or change.
Called when the auto-complete data source changes, allowing derived classes to respond to data source modifications.
protected virtual void OnAutoCompeleteDataSourceChanged()
Handles the popup closed event, allowing derived classes to perform cleanup or respond to popup closure.
protected virtual void OnPopupClosed(object sender, RadPopupClosedEventArgs args)
The source of the event.
argsRadPopupClosedEventArgsThe RadPopupClosedEventArgs containing event data.
Handles the popup opening event, ensuring the popup size is recalculated if items are modified during opening.
protected override void OnPopupOpening(CancelEventArgs e)
The CancelEventArgs containing event data that can cancel the popup opening.
Overrides:
Sets the binding context for the dropdown popup to ensure proper data binding functionality.
protected virtual void SetDropDownBindingContext()
Unsubscribes from all event handlers to prevent memory leaks and ensure proper cleanup.
protected virtual void UnwireEvents()
Updates the minimum and maximum size constraints for the popup control based on the configured dropdown size limits.
protected override void UpdatePopupMinMaxSize(RadPopupControlBase popup)
The RadPopupControlBase to update with size constraints.
Overrides:
Subscribes to all necessary event handlers for the list element and popup control to enable proper functionality.
protected virtual void WireEvents()