Class RadCollapsiblePanelElement
Represents the main element of a RadCollapsiblePanel control that provides collapsible/expandable functionality.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadCollapsiblePanelElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadCollapsiblePanelElement(RadCollapsiblePanel)
Initializes a new instance of the RadCollapsiblePanelElement class.
Declaration
public RadCollapsiblePanelElement(RadCollapsiblePanel ownerControl)
Parameters
|
RadCollapsiblePanel
ownerControl
The owner control. |
Fields
AnimationEasingTypeProperty
Identifies the AnimationEasingType dependency property.
Declaration
public static readonly RadProperty AnimationEasingTypeProperty
Field Value
|
RadProperty
|
AnimationFramesProperty
Identifies the AnimationFrames dependency property.
Declaration
public static readonly RadProperty AnimationFramesProperty
Field Value
|
RadProperty
|
AnimationIntervalProperty
Identifies the AnimationInterval dependency property.
Declaration
public static readonly RadProperty AnimationIntervalProperty
Field Value
|
RadProperty
|
AnimationTypeProperty
Identifies the AnimationType dependency property.
Declaration
public static readonly RadProperty AnimationTypeProperty
Field Value
|
RadProperty
|
ContentSizingModeProperty
Identifies the ContentSizingMode dependency property.
Declaration
public static readonly RadProperty ContentSizingModeProperty
Field Value
|
RadProperty
|
DefaultAnimatedProperty
ExpandDirectionProperty
Identifies the ExpandDirection dependency property.
Declaration
public static readonly RadProperty ExpandDirectionProperty
Field Value
|
RadProperty
|
IsExpandedProperty
Identifies the IsExpanded dependency property.
Declaration
public static readonly RadProperty IsExpandedProperty
Field Value
|
RadProperty
|
SlideAnimationAnimatedProperty
Declaration
protected static readonly RadProperty SlideAnimationAnimatedProperty
Field Value
|
RadProperty
|
Properties
AnimationEasingType
Gets or sets the easing type to be applied to the animations
Declaration
public RadEasingType AnimationEasingType { get; set; }
Property Value
|
RadEasingType
The animation easing type. |
AnimationFrames
Gets or sets the animation frames.
Declaration
public int AnimationFrames { get; set; }
Property Value
|
System.Int32
The animation frames. |
AnimationInterval
Gets or sets the animation interval.
Declaration
public int AnimationInterval { get; set; }
Property Value
|
System.Int32
The animation interval. |
AnimationType
Gets or sets the type of the expand or collapse animation.
Declaration
public CollapsiblePanelAnimationType AnimationType { get; set; }
Property Value
|
CollapsiblePanelAnimationType
The type of the animation. |
ContentSizingMode
Gets or sets the content sizing mode.
Declaration
public CollapsiblePanelContentSizingMode ContentSizingMode { get; set; }
Property Value
|
CollapsiblePanelContentSizingMode
The content sizing mode. |
EnableAnimation
Gets or sets a value indicating whether to use animation to expand or collapse the control.
Declaration
public bool EnableAnimation { get; set; }
Property Value
|
System.Boolean
|
ExpandDirection
Gets or sets the expand direction.
Declaration
public RadDirection ExpandDirection { get; set; }
Property Value
|
RadDirection
The expand direction. |
HeaderElement
Gets the header element.
Declaration
public CollapsiblePanelHeaderElement HeaderElement { get; }
Property Value
|
CollapsiblePanelHeaderElement
The header element. |
HeaderText
Gets or sets the header text.
Declaration
public string HeaderText { get; set; }
Property Value
|
System.String
The header text. |
HorizontalHeaderAlignment
Gets or sets the horizontal header alignment.
Declaration
public RadHorizontalAlignment HorizontalHeaderAlignment { get; set; }
Property Value
|
RadHorizontalAlignment
The horizontal header alignment. |
IsAnimating
Gets or sets a value indicating whether the control is currently animating.
Declaration
public bool IsAnimating { get; protected set; }
Property Value
|
System.Boolean
|
IsExpanded
Gets or Sets a value indicating whether the control is expanded.
Declaration
public bool IsExpanded { get; set; }
Property Value
|
System.Boolean
|
LayoutElement
Gets the layout element.
Declaration
public CollapsiblePanelLayoutElement LayoutElement { get; }
Property Value
|
CollapsiblePanelLayoutElement
The layout element which is responsible for the position of the ControlsContainer |
OwnerBoundsCache
This value is set when the control is about to be collapsed and is used to restore the control's size when expanding. It should only be set by the control itself.
Declaration
public Rectangle OwnerBoundsCache { get; set; }
Property Value
|
System.Drawing.Rectangle
|
ShowHeaderLine
Gets or sets a value indicating whether to show a line primitive in the header.
Declaration
public bool ShowHeaderLine { get; set; }
Property Value
|
System.Boolean
|
VerticalHeaderAlignment
Gets or sets the vertical header alignment.
Declaration
public RadVerticalAlignment VerticalHeaderAlignment { get; set; }
Property Value
|
RadVerticalAlignment
The vertical header alignment. |
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
|
Returns
|
System.Drawing.SizeF
|
Overrides
Collapse()
Collapses the control. Will not have effect if the control is already collapsed or is animating. Can be canceled from the Collapsing event.
Declaration
public virtual void Collapse()
Collapse(Boolean, Boolean)
Collapses the control. Will not have effect if the control is already collapsed or is animating. Can be canceled from the Collapsing event.
Declaration
public virtual void Collapse(bool ignoreIsExpanded, bool stopAnimations)
Parameters
|
System.Boolean
ignoreIsExpanded
if set to |
|
System.Boolean
stopAnimations
if set to |
CreateAnimation()
Creates the AnimatedPropertySetting instance which will be used to animate the control. Create it according to its IsExpanded value.
Declaration
protected virtual AnimatedPropertySetting CreateAnimation()
Returns
|
AnimatedPropertySetting
|
CreateAnimation(Boolean)
Creates the AnimatedPropertySetting instance which will be used to animate the control.
Declaration
protected virtual AnimatedPropertySetting CreateAnimation(bool isExpanded)
Parameters
|
System.Boolean
isExpanded
if set to |
Returns
|
AnimatedPropertySetting
|
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateCollapseAnimation()
Creates the collapse animation.
Declaration
protected AnimatedPropertySetting CreateCollapseAnimation()
Returns
|
AnimatedPropertySetting
The new AnimatedPropertySetting instance |
CreateExpandAnimation()
Creates the expand animation.
Declaration
protected AnimatedPropertySetting CreateExpandAnimation()
Returns
|
AnimatedPropertySetting
|
CreateHeaderElement()
Creates the header element.
Declaration
protected virtual CollapsiblePanelHeaderElement CreateHeaderElement()
Returns
|
CollapsiblePanelHeaderElement
|
CreateLayoutElement()
Creates the layout element.
Declaration
protected virtual CollapsiblePanelLayoutElement CreateLayoutElement()
Returns
|
CollapsiblePanelLayoutElement
|
DpiScaleChanged(SizeF)
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
|
System.Drawing.SizeF
scaleFactor
|
Overrides
ExecuteCollapseFinalizations()
Executes the collapse finalizations. This method is invoked after the panel has collapsed.
Declaration
protected virtual void ExecuteCollapseFinalizations()
Exceptions
|
System.InvalidOperationException
If the current enumeration is not supported |
|
System.InvalidOperationException
If the current animation type is not supported. |
ExecuteCollapsePreparations()
Executes the collapse preparations. This method is invoked before the panel starts collapsing.
Declaration
protected virtual void ExecuteCollapsePreparations()
Exceptions
|
System.InvalidOperationException
If the current enumeration is not supported |
ExecuteExpandFinalizations()
Executes the expand finalizations. This method is invoked after the panel has expanded.
Declaration
protected virtual void ExecuteExpandFinalizations()
Exceptions
|
System.InvalidOperationException
If the current enumeration is not supported |
ExecuteExpandPreparations()
Executes the expand preparations. This method is invoked before the panel starts expanded.
Declaration
protected virtual void ExecuteExpandPreparations()
Exceptions
|
System.InvalidOperationException
If the current enumeration is not supported |
|
System.InvalidOperationException
If the current animation type is not supported. |
Expand()
Expands the control. Will not have effect if the control is already expanded or is animating. Can be canceled from the Expanding event.
Declaration
public virtual void Expand()
Expand(Boolean, Boolean)
Expands the control. Will not have effect if the control is already expanded or is animating. Can be canceled from the Expanding event.
Declaration
public virtual void Expand(bool ignoreIsExpanded, bool stopAnimations)
Parameters
|
System.Boolean
ignoreIsExpanded
if set to |
|
System.Boolean
stopAnimations
if set to |
GetObjectToBeAnimated()
Gets the object to be animated. This object is used by the current animation object.
Declaration
protected virtual RadObject GetObjectToBeAnimated()
Returns
|
RadObject
|
Exceptions
|
System.InvalidOperationException
If the current enumeration is not supported |
MeasureOverride(SizeF)
Measures the desired size of the collapsible panel element and its children.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The available size that this element can use. |
Returns
|
System.Drawing.SizeF
The size that this element determines it needs during layout. |
Overrides
OnCollapsed()
OnCollapsing()
Raises the Collapsing event.
Declaration
protected virtual bool OnCollapsing()
Returns
|
System.Boolean
true if the collapse should continue; otherwise, false. |
OnExpanded()
OnExpanding()
Raises the Expanding event.
Declaration
protected virtual bool OnExpanding()
Returns
|
System.Boolean
true if the expansion should continue; otherwise, false. |
OnHeaderButtonClick(Object, EventArgs)
Handles the click event of the button in the collapsible panel's header.
Declaration
protected virtual void OnHeaderButtonClick(object sender, EventArgs e)
Parameters
|
System.Object
sender
The source of the event. |
|
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles changes to the properties of the collapsible panel element.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
|
RadPropertyChangedEventArgs
e
The RadPropertyChangedEventArgs instance containing information about which property changed and its new value. |
Overrides
OnPropertyChanging(RadPropertyChangingEventArgs)
Declaration
protected override void OnPropertyChanging(RadPropertyChangingEventArgs args)
Parameters
|
RadPropertyChangingEventArgs
args
|
Overrides
SaveOwnerControlBounds()
Declaration
protected virtual void SaveOwnerControlBounds()
SetControlBoundsAfterCollapsed()
Sets the control bounds after it is collapsed.
Declaration
protected virtual void SetControlBoundsAfterCollapsed()
SetOwnerControlBounds(Nullable<Point>, Nullable<Size>)
Sets the bounds of the owner control, using cached values if no parameters are provided.
Declaration
protected virtual void SetOwnerControlBounds(Point? location = default(Point? ), Size? size = default(Size? ))
Parameters
|
System.Nullable<System.Drawing.Point>
location
The new location of the control, or null to use the cached location. |
|
System.Nullable<System.Drawing.Size>
size
The new size of the control, or null to use the cached size. |
SetupRevealCollapseAnimation(AnimatedPropertySetting)
Setups the reveal collapse animation.
Declaration
protected void SetupRevealCollapseAnimation(AnimatedPropertySetting animation)
Parameters
|
AnimatedPropertySetting
animation
The animation to be set up. |
SetupRevealExpandAnimation(AnimatedPropertySetting)
Setups the reveal expand animation.
Declaration
protected void SetupRevealExpandAnimation(AnimatedPropertySetting animation)
Parameters
|
AnimatedPropertySetting
animation
The animation to be set up. |
SetupSlideCollapseAnimation(AnimatedPropertySetting)
Setups the slide collapse animation.
Declaration
protected void SetupSlideCollapseAnimation(AnimatedPropertySetting animation)
Parameters
|
AnimatedPropertySetting
animation
The animation to be set up. |
SetupSlideExpandAnimation(AnimatedPropertySetting)
Setups the slide expand animation.
Declaration
protected void SetupSlideExpandAnimation(AnimatedPropertySetting animation)
Parameters
|
AnimatedPropertySetting
animation
The animation to be set up. |
ToggleExpandCollapse()
If the Control is expanded it will be collapsed and vice-versa.
Declaration
public virtual void ToggleExpandCollapse()
ToggleExpandCollapse(Boolean, Boolean)
If the Control is expanded it will be collapsed and vice-versa.
Declaration
public virtual void ToggleExpandCollapse(bool ignoreIsExpanded, bool stopAnimations)
Parameters
|
System.Boolean
ignoreIsExpanded
if set to |
|
System.Boolean
stopAnimations
if set to |
Events
Collapsed
Occurs when the control is collapsed.
Declaration
public event EventHandler Collapsed
Event Type
|
System.EventHandler
|
Collapsing
Occurs when the control is about to be collapsed. Cancelable.
Declaration
public event CancelEventHandler Collapsing
Event Type
|
System.ComponentModel.CancelEventHandler
|
Expanded
Occurs when the control is expanded.
Declaration
public event EventHandler Expanded
Event Type
|
System.EventHandler
|
Expanding
Occurs when the control is about to be expanded. Cancelable.
Declaration
public event CancelEventHandler Expanding
Event Type
|
System.ComponentModel.CancelEventHandler
|