New to Telerik UI for WPFStart a free 30-day trial

Represents a collapsible content control that can expand and collapse to reveal or hide its content. The RadExpander class derives from HeaderedContentControl and implements the IThemable interface. It provides features for handling expansion and collapsing events, customizing the appearance of the header and button, and managing the visual states corresponding to the various expansion directions. The IsExpanded property determines whether the content is currently displayed. The control also includes properties for various header alignments, orientations, and styles, as well as events that notify when the content is expanded or collapsed.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
[TelerikToolboxCategory("Containers")]
public class RadExpander : HeaderedContentControl

Inheritance: objectRadExpander

Constructors

Initializes a new instance of the RadExpander class.

C#
public RadExpander()

Fields

ClickModeProperty

DependencyProperty

Identifies the ClickMode property.

C#
public static readonly DependencyProperty ClickModeProperty

CollapsedEvent

RoutedEvent

Occurs when the ContentElement is Collapsed.

C#
public static readonly RoutedEvent CollapsedEvent

ExpandDirectionProperty

DependencyProperty

Identifies the ExpandDirection property.

C#
public static readonly DependencyProperty ExpandDirectionProperty

ExpandedEvent

RoutedEvent

Occurs when the ContentElement is Expanded.

C#
public static readonly RoutedEvent ExpandedEvent

HeaderButtonStyleProperty

DependencyProperty

Identifies the HeaderButtonStyle property.

C#
public static readonly DependencyProperty HeaderButtonStyleProperty

HeaderOrientationProperty

DependencyProperty

Identifies the HeaderOrientation property.

C#
public static readonly DependencyProperty HeaderOrientationProperty

Identifies the HorizontalHeaderAlignment property.

C#
public static readonly DependencyProperty HorizontalHeaderAlignmentProperty

IsExpandedProperty

DependencyProperty

Identifies the IsExpanded property.

C#
public static readonly DependencyProperty IsExpandedProperty

IsHeaderPressedProperty

DependencyProperty

Identifies the IsHeaderPressed property.

C#
public static readonly DependencyProperty IsHeaderPressedProperty

IsMouseOverHeaderProperty

DependencyProperty

Identifies the IsMouseOver property.

C#
public static readonly DependencyProperty IsMouseOverHeaderProperty

Identifies the PreviewCollapsed property.

C#
public static readonly RoutedEvent PreviewCollapsedEvent

Identifies the PreviewExpanded property.

C#
public static readonly RoutedEvent PreviewExpandedEvent

Identifies the VerticalHeaderAlignment property.

C#
public static readonly DependencyProperty VerticalHeaderAlignmentProperty

Properties

ClickMode

ClickMode

Gets or sets when the content will expand. This is a dependency property.

C#
public ClickMode ClickMode { get; set; }

Gets or sets the direction in which the content would expand. This is a dependency property.

C#
public ExpandDirection ExpandDirection { get; set; }

Gets or sets the style which will be used for the HeaderButton. This is a dependency property.

C#
public Style HeaderButtonStyle { get; set; }

Gets or sets the orientation of the expand Header.

C#
public Orientation HeaderOrientation { get; }

HorizontalHeaderAlignment

HorizontalAlignment

Gets or sets the horizontal alignment of the expand Header.

C#
public HorizontalAlignment HorizontalHeaderAlignment { get; set; }

Gets or sets whether the content is expanded. This is a dependency property.

C#
public bool IsExpanded { get; set; }

Gets the IsHeaderPressed property.

C#
public bool IsHeaderPressed { get; set; }

Gets the IsMouseOver property.

C#
public bool IsMouseOverHeader { get; }

VerticalHeaderAlignment

VerticalAlignment

Gets or sets the horizontal alignment of the expand Header.

C#
public VerticalAlignment VerticalHeaderAlignment { get; set; }

Methods

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

C#
public override void OnApplyTemplate()
C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Events

Occurs when the content is Collapsed.

C#
public event RadRoutedEventHandler Collapsed

Occurs when the content Expanded.

C#
public event RadRoutedEventHandler Expanded

Occurs when the content will be Collapsed. If the event handler set True for the Handled property then the content will not collapse.

C#
public event RadRoutedEventHandler PreviewCollapsed

Occurs when the content will be Expanded. If the event handler set True for the Handled property then the content will not expand.

C#
public event RadRoutedEventHandler PreviewExpanded