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