Class RadPopupControlBase
Represents a base class for all popup-forms used throughout the suite.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadPopupControlBase : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IPopupControl
Constructors
RadPopupControlBase(RadElement)
Creates an instance of the RadPopupFormBase class.
Declaration
public RadPopupControlBase(RadElement owner)
Parameters
RadElement
owner
|
Fields
AnimationProperties
Declaration
public RadPopupControlBase.PopupAnimationProperties AnimationProperties
Field Value
RadPopupControlBase.PopupAnimationProperties
|
dpiScaleFactor
Declaration
protected SizeF dpiScaleFactor
Field Value
System.Drawing.SizeF
|
lastAlignmentRectangle
Declaration
protected Rectangle lastAlignmentRectangle
Field Value
System.Drawing.Rectangle
|
Properties
AlignmentRectangleOverlapMode
Gets or sets a value from the AlignmentRectangleOverlapMode which defines how the popup will be positioned according to the alignment rectangle when its location cannot be adjusted so that it meets all popup alignment and alignment correction mode requirements.
Declaration
public AlternativeCorrectionMode AlignmentRectangleOverlapMode { get; set; }
Property Value
AlternativeCorrectionMode
|
AnimationEnabled
Gets or sets a bool value determining whether popup animation is enabled.
Declaration
public bool AnimationEnabled { get; set; }
Property Value
System.Boolean
|
AnimationFrames
Gets or sets the count of the frames of the drop down animation.
Declaration
public int AnimationFrames { get; set; }
Property Value
System.Int32
|
AnimationType
Gets or sets a value determining what animation type to use when showing the popup.
Declaration
public PopupAnimationTypes AnimationType { get; set; }
Property Value
PopupAnimationTypes
|
Children
Gets a System.Collections.Generic.List<T> instance that represents a collection of logical children of this IPopupControl. The OwnerPopup property of these children would point to this IPopupControl instance.
Declaration
public List<IPopupControl> Children { get; }
Property Value
System.Collections.Generic.List<IPopupControl>
|
Implements
CreateParams
Declaration
protected override CreateParams CreateParams { get; }
Property Value
System.Windows.Forms.CreateParams
|
DropDownAnimationDirection
Gets or sets the direction of the drop-down animation.
Declaration
public RadDirection DropDownAnimationDirection { get; set; }
Property Value
RadDirection
|
DropShadow
Gets or sets a boolean value which determines whether the popup drops a shadow.
Declaration
public bool DropShadow { get; set; }
Property Value
System.Boolean
|
EasingType
Gets or sets the easing type for the drop down animations.
Declaration
public RadEasingType EasingType { get; set; }
Property Value
RadEasingType
|
EnableAeroEffects
Enables the support for Windows Vista DWM effects.
Declaration
public bool EnableAeroEffects { get; set; }
Property Value
System.Boolean
|
FadeAnimationFrames
Gets or sets the frame count for the fade animation.
Declaration
public int FadeAnimationFrames { get; set; }
Property Value
System.Int32
|
FadeAnimationSpeed
Gets or sets the time interval for each fade animation frame.
Declaration
public int FadeAnimationSpeed { get; set; }
Property Value
System.Int32
|
FadeAnimationType
Gets or sets a value indicating the type of the fade animation.
Declaration
public FadeAnimationType FadeAnimationType { get; set; }
Property Value
FadeAnimationType
|
FitToScreenMode
Gets or sets a value from the FitToScreenModes enum which defines how the size of the popup is fit to the currently active screen.
Declaration
public FitToScreenModes FitToScreenMode { get; set; }
Property Value
FitToScreenModes
|
HorizontalAlignmentCorrectionMode
Defines how the popup will be horizontally aligned in case of lack of screen space.
Declaration
public AlignmentCorrectionMode HorizontalAlignmentCorrectionMode { get; set; }
Property Value
AlignmentCorrectionMode
|
HorizontalPopupAlignment
Gets or sets a value that defines the horizontal alignment of the popup based on the alignment rectangle passed in the ShowPopup method.
Declaration
public HorizontalPopupAlignment HorizontalPopupAlignment { get; set; }
Property Value
HorizontalPopupAlignment
|
LastShowDpiScaleFactor
Declaration
public SizeF LastShowDpiScaleFactor { get; set; }
Property Value
System.Drawing.SizeF
|
NonAnimatedSize
Declaration
protected Size NonAnimatedSize { get; }
Property Value
System.Drawing.Size
|
Opacity
Gets or sets a float value that determines the opacity of the popup. This property accepts values from 0.0 to 1.0. For example, to make the popup semi-transparent, set the property to 0.5.
Declaration
public float Opacity { get; set; }
Property Value
System.Single
|
OwnerElement
Gets the RadElement that owns this popup.
Declaration
public RadElement OwnerElement { get; }
Property Value
RadElement
|
Implements
OwnerPopup
ScreenSpaceMode
Gets or sets a value from the ScreenSpaceMode enum which determines what part of the screen is considered when positioning the popup.
Declaration
public ScreenSpaceMode ScreenSpaceMode { get; set; }
Property Value
ScreenSpaceMode
|
ShouldRestoreAutoSize
Declaration
protected virtual bool ShouldRestoreAutoSize { get; }
Property Value
System.Boolean
|
VerticalAlignmentCorrectionMode
Defines how the popup will be vertically aligned in case of lack of screen space.
Declaration
public AlignmentCorrectionMode VerticalAlignmentCorrectionMode { get; set; }
Property Value
AlignmentCorrectionMode
|
VerticalPopupAlignment
Gets or sets a value that defines the vertical alignment of the popup based on the alignment rectangle passed in the ShowPopup method.
Declaration
public VerticalPopupAlignment VerticalPopupAlignment { get; set; }
Property Value
VerticalPopupAlignment
|
WindowsSettings
Gets or sets the windows related setting.
Declaration
public WindowsSettings WindowsSettings { get; set; }
Property Value
WindowsSettings
|
Methods
AnimationStarting()
Fires when a drop-down animation is about to begin.
Declaration
protected virtual void AnimationStarting()
ApplySizingConstraints(Size, Screen)
Declaration
protected virtual Size ApplySizingConstraints(Size availableSize, Screen currentScreen)
Parameters
System.Drawing.Size
availableSize
|
System.Windows.Forms.Screen
currentScreen
|
Returns
System.Drawing.Size
|
CallMouseWheel(MouseEventArgs)
Raises the MouseWheel event.
Declaration
protected virtual void CallMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
CanClosePopup(RadPopupCloseReason)
This method determines whether the IPopupControl can be closed. Used in the PopupManager class to prevent the IPopupControl from closing in specific occasions.
Declaration
public virtual bool CanClosePopup(RadPopupCloseReason reason)
Parameters
RadPopupCloseReason
reason
The reason why the IPopupControl is closed. |
Returns
System.Boolean
True if the IPopupControl can be closed, otherwise false. |
Implements
CheckMakeLastLocationCorrection(Rectangle, Point, Rectangle)
Checks whether the current alignment rectangle intersects with the popup's bounds according to a given popup location.
Declaration
protected virtual Point CheckMakeLastLocationCorrection(Rectangle alignmentRectangle, Point proposedLocation, Rectangle availableBounds)
Parameters
System.Drawing.Rectangle
alignmentRectangle
An instance of the System.Drawing.Rectangle struct that represents the current alignment rectangle. |
System.Drawing.Point
proposedLocation
An instance of the System.Drawing.Point struct that represents the proposed popup location. |
System.Drawing.Rectangle
availableBounds
An instance of the System.Drawing.Rectangle struct that represents the available bounds on the screen. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the result of the operation. |
CheckMakeLastLocationCorrection(Rectangle, Point, Rectangle, Size)
Checks whether the current alignment rectangle intersects with the popup's bounds according to a given popup location.
Declaration
protected virtual Point CheckMakeLastLocationCorrection(Rectangle alignmentRectangle, Point proposedLocation, Rectangle availableBounds, Size popupSize)
Parameters
System.Drawing.Rectangle
alignmentRectangle
An instance of the System.Drawing.Rectangle struct that represents the current alignment rectangle. |
System.Drawing.Point
proposedLocation
An instance of the System.Drawing.Point struct that represents the proposed popup location. |
System.Drawing.Rectangle
availableBounds
An instance of the System.Drawing.Rectangle struct that represents the available bounds on the screen. |
System.Drawing.Size
popupSize
The size of the popup. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the result of the operation. |
ClosePopup(PopupCloseInfo)
Closes the popup.
Declaration
public virtual void ClosePopup(PopupCloseInfo info)
Parameters
PopupCloseInfo
info
The info. |
Implements
ClosePopup(RadPopupCloseReason)
Closes the IPopupControl.
Declaration
public virtual void ClosePopup(RadPopupCloseReason reason)
Parameters
RadPopupCloseReason
reason
|
Implements
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
GetAvailableBoundsFromScreen(Screen)
Gets a System.Drawing.Rectangle which represents the available bounds for the popup to show. By default this method returns the bounds of the screen.
Declaration
protected virtual Rectangle GetAvailableBoundsFromScreen(Screen screen)
Parameters
System.Windows.Forms.Screen
screen
An instance of the System.Windows.Forms.Screen class that represents the active screen where the popup is about to be shown. |
Returns
System.Drawing.Rectangle
An instance of the System.Drawing.Rectangle struct that represents the available bounds for the popup based on the active screen. |
GetBackupSize()
Declaration
protected virtual Size GetBackupSize()
Returns
System.Drawing.Size
|
GetCorrectedHorizontalLocation(Screen, Rectangle, Point)
Calculates the horizontal position of the popup according to the current HorizontalPopupAlignment and AlignmentCorrectionMode.
Declaration
protected virtual Point GetCorrectedHorizontalLocation(Screen currentScreen, Rectangle alignmentRectangle, Point calculatedLocation)
Parameters
System.Windows.Forms.Screen
currentScreen
The screen in which the popup will be aligned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle of the popup. |
System.Drawing.Point
calculatedLocation
The calculated location that will be corrected if needed. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the corrected location of the popup |
GetCorrectedHorizontalLocation(Screen, Rectangle, Point, Size)
Calculates the horizontal position of the popup according to the current HorizontalPopupAlignment and AlignmentCorrectionMode.
Declaration
protected virtual Point GetCorrectedHorizontalLocation(Screen currentScreen, Rectangle alignmentRectangle, Point calculatedLocation, Size popupSize)
Parameters
System.Windows.Forms.Screen
currentScreen
The screen in which the popup will be aligned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle of the popup. |
System.Drawing.Point
calculatedLocation
The calculated location that will be corrected if needed. |
System.Drawing.Size
popupSize
The size of the popup. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the corrected location of the popup |
GetCorrectedLocation(Rectangle)
This method returns a point which defines the position of the popup.
By default, aligns the popup based on the alignmentRectangle
and the current alignment settings. You can adjust the alignment settings
by settin the HorizontalPopupAlignment and VerticalPopupAlignment properties.
Declaration
protected virtual Point GetCorrectedLocation(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle based on which the popup is aligned. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the calculated position of the popup. |
GetCorrectedLocation(Screen, Rectangle)
This method returns a point which defines the position of the popup.
By default, aligns the popup based on the alignmentRectangle
and the current alignment settings. You can adjust the alignment settings
by settin the HorizontalPopupAlignment and VerticalPopupAlignment properties.
Declaration
protected virtual Point GetCorrectedLocation(Screen currentScreen, Rectangle alignmentRectangle)
Parameters
System.Windows.Forms.Screen
currentScreen
An instance of the System.Windows.Forms.Screen class that represents the screen where the popup is about to be positioned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle based on which the popup is aligned. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the calculated position of the popup. |
GetCorrectedLocation(Screen, Rectangle, Size)
This method returns a point which defines the position of the popup.
By default, aligns the popup based on the alignmentRectangle
and the current alignment settings. You can adjust the alignment settings
by settin the HorizontalPopupAlignment and VerticalPopupAlignment properties.
Declaration
protected virtual Point GetCorrectedLocation(Screen currentScreen, Rectangle alignmentRectangle, Size popupSize)
Parameters
System.Windows.Forms.Screen
currentScreen
An instance of the System.Windows.Forms.Screen class that represents the screen where the popup is about to be positioned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle based on which the popup is aligned. |
System.Drawing.Size
popupSize
The size of the popup. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the calculated position of the popup. |
GetCorrectedVerticalLocation(Screen, Rectangle, Point)
Calculates the vertical position of the popup according to the current VerticalPopupAlignment and AlignmentCorrectionMode.
Declaration
protected virtual Point GetCorrectedVerticalLocation(Screen currentScreen, Rectangle alignmentRectangle, Point calculatedLocation)
Parameters
System.Windows.Forms.Screen
currentScreen
The screen in which the popup will be aligned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle of the popup. |
System.Drawing.Point
calculatedLocation
The calculated location that will be corrected if needed. |
Returns
System.Drawing.Point
An integer that represents the corrected vertical location of the popup |
GetCorrectedVerticalLocation(Screen, Rectangle, Point, Size)
Calculates the vertical position of the popup according to the current VerticalPopupAlignment and AlignmentCorrectionMode.
Declaration
protected virtual Point GetCorrectedVerticalLocation(Screen currentScreen, Rectangle alignmentRectangle, Point calculatedLocation, Size popupSize)
Parameters
System.Windows.Forms.Screen
currentScreen
The screen in which the popup will be aligned. |
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle of the popup. |
System.Drawing.Point
calculatedLocation
The calculated location that will be corrected if needed. |
System.Drawing.Size
popupSize
The size of the popup. |
Returns
System.Drawing.Point
An integer that represents the corrected vertical location of the popup |
GetCurrentScreen()
Gets an instance of the System.Windows.Forms.Screen class that represents the screen where the popup is displayed.
Declaration
public Screen GetCurrentScreen()
Returns
System.Windows.Forms.Screen
|
GetCurrentScreen(Rectangle)
Gets the screen on which the popup will be displayed.
Declaration
protected virtual Screen GetCurrentScreen(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle for the popup. |
Returns
System.Windows.Forms.Screen
An instance of the System.Windows.Forms.Screen class that represents the screen where the popup will be displayed. |
GetHorizontalPopupLocation(Rectangle)
Calculates the horizontal popup location based on the alignmentRectangle
.
This method uses the HorizontalPopupAlignment property setting.
Declaration
protected virtual int GetHorizontalPopupLocation(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
An instance of the System.Drawing.Rectangle struct that represents the alignment rectangle. |
Returns
System.Int32
Returns an integer that represents the X coordinate of the popup. |
GetVerticalPopupLocation(Rectangle)
Calculates the vertical popup location based on the alignmentRectangle
.
This method uses the VerticalPopupAlignment property setting.
Declaration
protected virtual int GetVerticalPopupLocation(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
An instance of the System.Drawing.Rectangle struct that represents the alignment rectangle. |
Returns
System.Int32
Returns an integer that represents the Y coordinate of the popup. |
Hide()
Closes the popup.
Declaration
public void Hide()
InitializeDropDownAnimation(Point)
Declaration
protected virtual void InitializeDropDownAnimation(Point location)
Parameters
System.Drawing.Point
location
|
OnAlternativeXLocationNeeded(Rectangle, Point, Rectangle)
This method is executed when the popup needs to receive manual horizontal alignment. This can happen when there is no reasonable possibility for the alignment routines to define a proper horizontal position for the popup. In this way the developer is enabled to define a horizontal position according to their preferences.
Declaration
protected virtual Point OnAlternativeXLocationNeeded(Rectangle alignmentRectangle, Point proposedLocation, Rectangle availableBounds)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The proposed alignment rectangle with screen coordinates. |
System.Drawing.Point
proposedLocation
The proposed coordinates |
System.Drawing.Rectangle
availableBounds
The proposed available space for the popup. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the location of the popup. |
OnAlternativeYLocationNeeded(Rectangle, Point, Rectangle)
This method is executed when the popup needs to receive manual vertical alignment. This can happen when there is no reasonable possibility for the alignment routines to define a proper vertical position for the popup. In this way the developer is enabled to define a vertical position according to their preferences.
Declaration
protected virtual Point OnAlternativeYLocationNeeded(Rectangle alignmentRectangle, Point proposedLocation, Rectangle availableBounds)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The proposed alignment rectangle with screen coordinates. |
System.Drawing.Point
proposedLocation
The proposed coordinates |
System.Drawing.Rectangle
availableBounds
The proposed available space for the popup. |
Returns
System.Drawing.Point
An instance of the System.Drawing.Point struct that represents the location of the popup. |
OnAnimating(AnimationEventArgs)
Declaration
protected virtual void OnAnimating(AnimationEventArgs e)
Parameters
AnimationEventArgs
e
|
OnAnimationFinished(AnimationEventArgs)
Declaration
protected virtual void OnAnimationFinished(AnimationEventArgs args)
Parameters
AnimationEventArgs
args
|
OnKeyDown(Keys)
Executes when a key is pressed.
Declaration
public virtual bool OnKeyDown(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
An instance of the System.Windows.Forms.Keys struct which contains the key information. |
Returns
System.Boolean
A boolean value that determines whether the IPopupControl processes the message. |
Implements
OnMouseWheel(Control, Int32)
Determines whether the MouseWheel event is handled by the popup.
Declaration
public virtual bool OnMouseWheel(Control target, int delta)
Parameters
System.Windows.Forms.Control
target
|
System.Int32
delta
|
Returns
System.Boolean
|
Implements
OnPopupClosed(PopupCloseInfo)
Called when popup is closed.
Declaration
protected virtual void OnPopupClosed(PopupCloseInfo info)
Parameters
PopupCloseInfo
info
The info. |
OnPopupClosed(RadPopupClosedEventArgs)
Fires when the popup is closed.
Declaration
protected virtual void OnPopupClosed(RadPopupClosedEventArgs args)
Parameters
RadPopupClosedEventArgs
args
A RadPopupClosedEventArgs instance that contains information about what caused the popup to close. |
OnPopupClosing(PopupCloseInfo)
Called when the popup is closing.
Declaration
protected virtual bool OnPopupClosing(PopupCloseInfo info)
Parameters
PopupCloseInfo
info
The info. |
Returns
System.Boolean
|
OnPopupClosing(RadPopupClosingEventArgs)
Fires when the popup is about to close.
Declaration
protected virtual void OnPopupClosing(RadPopupClosingEventArgs args)
Parameters
RadPopupClosingEventArgs
args
A RadPopupClosingEventArgs instance that contains information about the event |
OnPopupOpened()
Fires when the popup is opened.
Declaration
protected virtual void OnPopupOpened()
OnPopupOpening(CancelEventArgs)
Fires when the popup is about to open.
Declaration
protected virtual void OnPopupOpening(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs
args
A CancelEventArgs object that contains information about the event |
ProcessFocusRequested(RadElement)
Declaration
protected override bool ProcessFocusRequested(RadElement element)
Parameters
RadElement
element
|
Returns
System.Boolean
|
Overrides
Show()
Shows the popup based on the value set to its Location property.
Declaration
public void Show()
Show(Point)
Shows the popup at the location passed as a parameter. The location is in screen coordinates
Declaration
public void Show(Point screenLocation)
Parameters
System.Drawing.Point
screenLocation
An instance of the System.Drawing.Point struct that represents the location. |
Show(Control)
Shows the control based on the screen rectangle of a given control.
Declaration
public void Show(Control control)
Parameters
System.Windows.Forms.Control
control
The control which defines the location of the popup. |
ShowPopup(Rectangle)
Shows the popup.
Declaration
public virtual void ShowPopup(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle. |
Implements
ShowPopupCore(Size, Point)
Declaration
protected virtual void ShowPopupCore(Size size, Point location)
Parameters
System.Drawing.Size
size
|
System.Drawing.Point
location
|
UpdateAeroEffectState()
Updates the Aero effects support upon property change.
Declaration
protected void UpdateAeroEffectState()
UpdateLocation()
Updates the location of the popup based on the last used alignment rectangle and the current alignment settings. You can adjust the alignment settings by using the VerticalPopupAlignment and HorizontalPopupAlignment properties.
Declaration
public void UpdateLocation()
UpdateLocation(Rectangle)
Updates the location of the popup based on the alignment rectangle and the current alignment settings. You can adjust the alignment settings by using the VerticalPopupAlignment and HorizontalPopupAlignment properties.
Declaration
public void UpdateLocation(Rectangle alignmentRectangle)
Parameters
System.Drawing.Rectangle
alignmentRectangle
The alignment rectangle based on which the popup is positioned. |
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
System.Windows.Forms.Message
m
|
Overrides
Events
FadeAnimationFinished
Fires when a fade animation has finished. The event args contain information about the type of the animation.
Declaration
public event RadPopupFadeAnimationFinishedEventHandler FadeAnimationFinished
Event Type
RadPopupFadeAnimationFinishedEventHandler
|
MouseWheel
Occurs when the mouse pointer is moved over the element.
Declaration
public event MouseEventHandler MouseWheel
Event Type
System.Windows.Forms.MouseEventHandler
|
PopupClosed
Fires when the popup is closed.
Declaration
public event RadPopupClosedEventHandler PopupClosed
Event Type
RadPopupClosedEventHandler
|
PopupClosing
Fires when the popup is about to be closed.
Declaration
public event RadPopupClosingEventHandler PopupClosing
Event Type
RadPopupClosingEventHandler
|
PopupOpened
Fires when the popup-form is opened.
Declaration
public event RadPopupOpenedEventHandler PopupOpened
Event Type
RadPopupOpenedEventHandler
|
PopupOpening
Fires when the popup-form is about to be opened.
Declaration
public event RadPopupOpeningEventHandler PopupOpening
Event Type
RadPopupOpeningEventHandler
|