Represents the main element of a RadCollapsiblePanel control that provides collapsible/expandable functionality.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadCollapsiblePanelElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadCollapsiblePanelElement...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadCollapsiblePanelElement class.
public RadCollapsiblePanelElement(RadCollapsiblePanel ownerControl)
The owner control.
Fields
Identifies the AnimationEasingType dependency property.
public static readonly RadProperty AnimationEasingTypeProperty
Identifies the AnimationFrames dependency property.
public static readonly RadProperty AnimationFramesProperty
Identifies the AnimationInterval dependency property.
public static readonly RadProperty AnimationIntervalProperty
Identifies the AnimationType dependency property.
public static readonly RadProperty AnimationTypeProperty
Identifies the ContentSizingMode dependency property.
public static readonly RadProperty ContentSizingModeProperty
protected static readonly RadProperty DefaultAnimatedProperty
Identifies the ExpandDirection dependency property.
public static readonly RadProperty ExpandDirectionProperty
Identifies the IsExpanded dependency property.
public static readonly RadProperty IsExpandedProperty
protected static readonly RadProperty SlideAnimationAnimatedProperty
Properties
Gets or sets the easing type to be applied to the animations
public RadEasingType AnimationEasingType { get; set; }
The animation easing type.
Gets or sets the animation frames.
public int AnimationFrames { get; set; }
The animation frames.
Gets or sets the animation interval.
public int AnimationInterval { get; set; }
The animation interval.
Gets or sets the type of the expand or collapse animation.
public CollapsiblePanelAnimationType AnimationType { get; set; }
The type of the animation.
Gets or sets the content sizing mode.
public CollapsiblePanelContentSizingMode ContentSizingMode { get; set; }
The content sizing mode.
Gets or sets a value indicating whether to use animation to expand or collapse the control.
public bool EnableAnimation { get; set; }
true if the expand/collapse animations are enabled; otherwise, false.
Gets or sets the expand direction.
public RadDirection ExpandDirection { get; set; }
The expand direction.
Gets the header element.
public CollapsiblePanelHeaderElement HeaderElement { get; }
The header element.
Gets or sets the header text.
public string HeaderText { get; set; }
The header text.
Gets or sets the horizontal header alignment.
public RadHorizontalAlignment HorizontalHeaderAlignment { get; set; }
The horizontal header alignment.
Gets or sets a value indicating whether the control is currently animating.
public bool IsAnimating { get; protected set; }
true if the control is currently animating; otherwise, false.
Gets or Sets a value indicating whether the control is expanded.
public bool IsExpanded { get; set; }
true if the control is expanded; otherwise, false.
Gets the layout element.
public CollapsiblePanelLayoutElement LayoutElement { get; }
The layout element which is responsible for the position of the ControlsContainer
Gets or sets a value indicating whether to show a line primitive in the header.
public bool ShowHeaderLine { get; set; }
true if a line in the header is visible; otherwise, false.
Gets or sets the vertical header alignment.
public RadVerticalAlignment VerticalHeaderAlignment { get; set; }
The vertical header alignment.
Methods
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
Collapses the control. Will not have effect if the control is already collapsed or is animating. Can be canceled from the Collapsing event.
public virtual void Collapse()
Collapses the control. Will not have effect if the control is already collapsed or is animating. Can be canceled from the Collapsing event.
Creates the instance which will be used to animate the control. Create it according to its IsExpanded value.
Creates the instance which will be used to animate the control.
protected virtual AnimatedPropertySetting CreateAnimation(bool isExpanded)
if set to true expand animation will be created, otherwise collapse animation will be created.
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
Creates the collapse animation.
protected AnimatedPropertySetting CreateCollapseAnimation()
The new AnimatedPropertySetting instance
Creates the expand animation.
Creates the header element.
protected virtual CollapsiblePanelHeaderElement CreateHeaderElement()
Creates the layout element.
protected virtual CollapsiblePanelLayoutElement CreateLayoutElement()
Called when the DPI scale factor changes. Updates the scale factor and notifies child elements.
public override void DpiScaleChanged(SizeF scaleFactor)
The new DPI scale factor.
Overrides:
Executes the collapse finalizations. This method is invoked after the panel has collapsed.
protected virtual void ExecuteCollapseFinalizations()
If the current enumeration is not supported
If the current animation type is not supported.
Executes the collapse preparations. This method is invoked before the panel starts collapsing.
protected virtual void ExecuteCollapsePreparations()
If the current enumeration is not supported
Executes the expand finalizations. This method is invoked after the panel has expanded.
protected virtual void ExecuteExpandFinalizations()
If the current enumeration is not supported
Executes the expand preparations. This method is invoked before the panel starts expanded.
protected virtual void ExecuteExpandPreparations()
If the current enumeration is not supported
If the current animation type is not supported.
Expands the control. Will not have effect if the control is already expanded or is animating. Can be canceled from the Expanding event.
public virtual void Expand()
Expands the control. Will not have effect if the control is already expanded or is animating. Can be canceled from the Expanding event.
Gets the object to be animated. This object is used by the current animation object.
protected virtual RadObject GetObjectToBeAnimated()
If the current enumeration is not supported
Measures the desired size of the collapsible panel element and its children.
Raises the Collapsed event.
protected virtual void OnCollapsed()
Raises the Collapsing event.
protected virtual bool OnCollapsing()
true if the collapse should continue; otherwise, false.
Raises the Expanded event.
protected virtual void OnExpanded()
Handles changes to the properties of the collapsible panel element.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The RadPropertyChangedEventArgs instance containing information about which property changed and its new value.
Overrides:
Called before a property value is changed, allowing for validation or cancellation of text changes.
protected override void OnPropertyChanging(RadPropertyChangingEventArgs args)
The property changing event arguments.
Overrides:
protected virtual void SaveOwnerControlBounds()
Sets the control bounds after it is collapsed.
protected virtual void SetControlBoundsAfterCollapsed()
Sets the bounds of the owner control, using cached values if no parameters are provided.
Setups the reveal collapse animation.
protected void SetupRevealCollapseAnimation(AnimatedPropertySetting animation)
The animation to be set up.
Setups the reveal expand animation.
protected void SetupRevealExpandAnimation(AnimatedPropertySetting animation)
The animation to be set up.
Setups the slide collapse animation.
protected void SetupSlideCollapseAnimation(AnimatedPropertySetting animation)
The animation to be set up.
Setups the slide expand animation.
protected void SetupSlideExpandAnimation(AnimatedPropertySetting animation)
The animation to be set up.
If the Control is expanded it will be collapsed and vice-versa.
public virtual void ToggleExpandCollapse()
If the Control is expanded it will be collapsed and vice-versa.
Events
Occurs when the control is collapsed.
public event EventHandler Collapsed
Occurs when the control is about to be collapsed. Cancelable.
public event CancelEventHandler Collapsing
Occurs when the control is expanded.
public event EventHandler Expanded
Occurs when the control is about to be expanded. Cancelable.
public event CancelEventHandler Expanding