CollapsibleElement
Defines methods and properties for a collapsible element. For example, RadRibonBarChunk is a collapsible element.
Definition
Namespace:Telerik.WinControls.Layouts
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class CollapsibleElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemCollapsibleElement...
Derived Classes:
Implements:
Inherited Members
Constructors
protected CollapsibleElement()
Fields
Contains the collapsible descendants discovered the last time the child collection was refreshed.
public IList<CollapsibleElement> collapsableChildren
Indicates that the cached collapsible-child list must be rebuilt from the element tree.
protected bool invalidateCollapsableChildrenCollection
Properties
Gets or sets whether this element is allowed to transition to a more-collapsed state.
[Browsable(false)]
public bool AllowCollapsed { get; set; }
Gets the greatest collapse-step value supported by this element.
[Browsable(false)]
public abstract int CollapseMaxSteps { get; }
Gets or sets the current collapse step, from 1 through CollapseMaxSteps.
[Browsable(false)]
public int CollapseStep { get; set; }
Assignments outside this range are ignored.
Gets or sets the factory used to adapt child elements for collapsing.
[Browsable(false)]
public CollapsibleElement.CreateAdapterDelegate CreateAdapterMethod { get; set; }
When no factory has been assigned, the default is CreateAdapter(RadElement).
Gets or sets the element's desired size after its most recent collapse transition.
[Browsable(false)]
public SizeF SizeAfterCollapsing { get; set; }
Gets or sets the element's desired size before its most recent collapse transition.
[Browsable(false)]
public SizeF SizeBeforeCollapsing { get; set; }
Methods
Raises the ribbon bar's cancellable visibility-state notification before applying a state change.
protected virtual bool CanExecuteExpandCollapse(RadItem item, bool isExpanding, ChunkVisibilityState nextState)
The item whose state is changing.
isExpandingbooltrue when expanding; otherwise, false.
nextStateChunkVisibilityStateThe requested visibility state.
Returns:Collapses each cached child that is not already in the simplified drop-down.
protected virtual bool CollapseCollection(int nextStep)
The collapse state to apply to each child.
Returns:true if any child changed state.
The parent's CollapseStep is set to
nextStepeven when no child changes state.
Expands each cached child to the specified state.
protected virtual bool ExpandCollection(int nextStep)
The expanded state to apply to each child.
Returns:true if any child changed state.
The parent's CollapseStep is set to
nextStepeven when no child changes state.
Rebuilds the cached collection by adapting each child or recursively searching its descendants.
protected void FillCollapsableChildrenCollection(RadElement baseItem)
The element whose child tree is searched.
Finds the cached button adapter associated with an element.
protected virtual CollapsibleElement FindCollapsibleChild(RadElement item)
The element to locate.
Returns:The matching button adapter, or null if the element has no cached button adapter.
Rebuilds collapsableChildren when its invalidation flag is set.
protected virtual void InvalidateIfNeeded()
Called after the element enters or leaves the ribbon bar's simplified layout.
protected virtual void OnIsSimplifiedChanged()
Applies each supported collapse transition, then expands through the intermediate states and leaves CollapseStep at 1.
protected void ResetStateSizes()