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

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:

C#
[TelerikToolboxCategory("Containers")]
public class RadFluidContentControl : ContentControl

Inheritance: objectRadFluidContentControl

Constructors

Initializes a new instance of the RadFluidContentControl class.

C#
public RadFluidContentControl()

Fields

ContentChangeModeProperty

DependencyProperty

Identifies the ContentChangeMode dependency property.

C#
public static readonly DependencyProperty ContentChangeModeProperty

LargeContentProperty

DependencyProperty

Identifies the LargeContent dependency property.

C#
public static readonly DependencyProperty LargeContentProperty

Identifies the LargeContentTemplate dependency property.

C#
public static readonly DependencyProperty LargeContentTemplateProperty

Identifies the NormalToLargeThreshold dependency property.

C#
public static readonly DependencyProperty NormalToLargeThresholdProperty

Identifies the NormalToSmallThreshold dependency property.

C#
public static readonly DependencyProperty NormalToSmallThresholdProperty

SmallContentProperty

DependencyProperty

Identifies the SmallContent dependency property.

C#
public static readonly DependencyProperty SmallContentProperty

Identifies the SmallContentTemplate dependency property.

C#
public static readonly DependencyProperty SmallContentTemplateProperty

StateProperty

DependencyProperty

Identifies the State dependency property.

C#
public static readonly DependencyProperty StateProperty

TransitionDurationProperty

DependencyProperty

Identifies the TransitionDuration dependency property.

C#
public static readonly DependencyProperty TransitionDurationProperty
Field Value:

Returns the TransitionDuration dependency property.

TransitionProperty

DependencyProperty

Identifies the Transition dependency property.

C#
public static readonly DependencyProperty TransitionProperty
Field Value:

Returns the current Transition value of the RadFluidContentControl.

VisibleContentProperty

DependencyProperty

Identifies the VisibleContent readonly dependency property.

C#
public static readonly DependencyProperty VisibleContentProperty

Identifies the VisibleContentTemplate dependency property.

C#
public static readonly DependencyProperty VisibleContentTemplateProperty

Properties

Gets or sets the content change mode.

C#
public ContentChangeMode ContentChangeMode { get; set; }
Property Value:

The content change mode.

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

C#
public object LargeContent { get; set; }
Property Value:

The content visible when the control is in Large state.

Gets or sets the large content template.

C#
public DataTemplate LargeContentTemplate { get; set; }
Property Value:

The large content template.

Gets or sets the normal to large threshold.

C#
public Size NormalToLargeThreshold { get; set; }
Property Value:

The normal to large threshold.

Gets or sets the normal to small threshold.

C#
public Size NormalToSmallThreshold { get; set; }
Property Value:

The normal to small threshold.

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

C#
public object SmallContent { get; set; }
Property Value:

The visible when the control is in Small state.

Gets or sets the small content template.

C#
public DataTemplate SmallContentTemplate { get; set; }
Property Value:

The small content template.

Gets or sets the current state of the FluidContentControl.

C#
public FluidContentControlState State { get; set; }
Property Value:

The state.

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

C#
public TransitionProvider Transition { get; set; }

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

C#
public TimeSpan TransitionDuration { get; set; }

Gets the currently visible content.

C#
public object VisibleContent { get; }
Property Value:

The visible content.

Methods

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

C#
protected override Size MeasureOverride(Size availableSize)
Parameters:availableSizeSize

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.

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

C#
public override void OnApplyTemplate()

Raised on content changed.

C#
protected override void OnContentChanged(object oldContent, object newContent)
Parameters:oldContentobjectnewContentobject

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 State property of the control is changed.

C#
public event EventHandler<FluidContentControlStateChangedEventArgs> StateChanged