Class
RadFluidContentControl

The RadFluidContentControl is a specialized content control that dynamically adjusts which of its three content properties is displayed based on the available space. It utilizes customizable thresholds to precisely define the conditions under which the content changes visibility, allowing for seamless transitions between different content states: Small, Normal, and Large. This control is especially useful for responsive designs where the layout adapts to varying screen sizes or layout changes.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Containers")]
public class RadFluidContentControl : ContentControl

Inheritance: objectRadFluidContentControl

Constructors

RadFluidContentControl()

Initializes a new instance of the RadFluidContentControl class.

Declaration

cs-api-definition
public RadFluidContentControl()

Fields

ContentChangeModeProperty

Identifies the ContentChangeMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ContentChangeModeProperty

Field Value

DependencyProperty

LargeContentProperty

Identifies the LargeContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty LargeContentProperty

Field Value

DependencyProperty

LargeContentTemplateProperty

Identifies the LargeContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty LargeContentTemplateProperty

Field Value

DependencyProperty

NormalToLargeThresholdProperty

Identifies the NormalToLargeThreshold dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NormalToLargeThresholdProperty

Field Value

DependencyProperty

NormalToSmallThresholdProperty

Identifies the NormalToSmallThreshold dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NormalToSmallThresholdProperty

Field Value

DependencyProperty

SmallContentProperty

Identifies the SmallContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SmallContentProperty

Field Value

DependencyProperty

SmallContentTemplateProperty

Identifies the SmallContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SmallContentTemplateProperty

Field Value

DependencyProperty

StateProperty

Identifies the State dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty StateProperty

Field Value

DependencyProperty

TransitionDurationProperty

Identifies the TransitionDuration dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TransitionDurationProperty

Field Value

DependencyProperty

Returns the TransitionDuration dependency property.

TransitionProperty

Identifies the Transition dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TransitionProperty

Field Value

DependencyProperty

Returns the current Transition value of the RadFluidContentControl.

VisibleContentProperty

Identifies the VisibleContent readonly dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VisibleContentProperty

Field Value

DependencyProperty

VisibleContentTemplateProperty

Identifies the VisibleContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VisibleContentTemplateProperty

Field Value

DependencyProperty

Properties

ContentChangeMode

Gets or sets the content change mode.

Declaration

cs-api-definition
public ContentChangeMode ContentChangeMode { get; set; }

Property Value

ContentChangeMode

The content change mode.

LargeContent

Gets or sets the content visible when the control is in Large state.

Declaration

cs-api-definition
public object LargeContent { get; set; }

Property Value

object

The content visible when the control is in Large state.

LargeContentTemplate

Gets or sets the large content template.

Declaration

cs-api-definition
public DataTemplate LargeContentTemplate { get; set; }

Property Value

DataTemplate

The large content template.

NormalToLargeThreshold

Gets or sets the normal to large threshold.

Declaration

cs-api-definition
public Size NormalToLargeThreshold { get; set; }

Property Value

Size

The normal to large threshold.

NormalToSmallThreshold

Gets or sets the normal to small threshold.

Declaration

cs-api-definition
public Size NormalToSmallThreshold { get; set; }

Property Value

Size

The normal to small threshold.

SmallContent

Gets or sets the content visible when the control is in Small state.

Declaration

cs-api-definition
public object SmallContent { get; set; }

Property Value

object

The visible when the control is in Small state.

SmallContentTemplate

Gets or sets the small content template.

Declaration

cs-api-definition
public DataTemplate SmallContentTemplate { get; set; }

Property Value

DataTemplate

The small content template.

State

Gets or sets the current state of the FluidContentControl.

Declaration

cs-api-definition
public FluidContentControlState State { get; set; }

Property Value

FluidContentControlState

The state.

Transition

Gets or sets the transition effect applied when the content of the control changes.

Declaration

cs-api-definition
public TransitionProvider Transition { get; set; }

Property Value

TransitionProvider

TransitionDuration

Gets or sets the duration of the transition effect in the RadFluidContentControl.

Declaration

cs-api-definition
public TimeSpan TransitionDuration { get; set; }

Property Value

TimeSpan

VisibleContent

Gets the currently visible content.

Declaration

cs-api-definition
public object VisibleContent { get; }

Property Value

object

The visible content.

Methods

MeasureOverride(Size)

Provides the behavior for the Measure pass of Silverlight layout. Classes can override this method to define their own Measure pass behavior.

Declaration

cs-api-definition
protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize

Size

The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available.

Returns

Size

The size that this object determines it needs during layout, based on its calculations of child object allotted sizes.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnContentChanged(object, object)

Raised on content changed.

Declaration

cs-api-definition
protected override void OnContentChanged(object oldContent, object newContent)

Parameters

oldContent

object

newContent

object

OnInitialized(EventArgs)

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

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

Events

StateChanged

Occurs when the State property of the control is changed.

Declaration

cs-api-definition
public event EventHandler<FluidContentControlStateChangedEventArgs> StateChanged

Event Value

EventHandler<FluidContentControlStateChangedEventArgs>