# Getting Started with WPF FluidContentControl

This tutorial will walk you through the creation of a sample application that contains **RadFluidContentControl**.

## Adding Telerik Assemblies Using NuGet

To use **RadFluidContentControl** when working with NuGet packages, install the `Telerik.Windows.Controls.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**

You can find the required assemblies for each control from the suite in the [Controls Dependencies](https://www.telerik.com/products/wpf/documentation/common-information/installation-installing-dependencies-wpf) help article.

## Content States

RadFluidContentControl supports three states for displaying the different contents. When the control enters a state the corresponding view will be displayed.

* **Small**
* **Normal**
* **Large**

> important Only a single content will be displayed at a time.

Read the [Setting up the Content Changing Mechanism](https://www.telerik.com/products/wpf/documentation/controls/radfluidcontentcontrol/getting-started#setting-up-the-content-changing-mechanism) section of this article to see how to change states.

## Defining a RadFluidContentControl

The control exposes a few properties that allow you to set a different content for the different states.

* **SmallContent**: The property accepts any object and it will display it when the control is in **Small** state.

* **Content**: The property accepts any object and it will display it when the control is in **Normal** state.

* **LargeContent**: The property accepts any object and it will display it when the control is in **Large** state.

> Each of the content properties has a corresponding content template property - **SmallContentTemplate**, **ContentTemplate** and **LargeContentTemplate**

**Example 1: RadFluidContentControl definition in XAML**

```XAML
<telerik:RadFluidContentControl>
    <telerik:RadFluidContentControl.SmallContent>
        <Border Background="Bisque">
            <TextBlock Text="small content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.SmallContent>
    <telerik:RadFluidContentControl.Content>
        <Border Background="Olive">
            <TextBlock Text="Normal content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.Content>
    <telerik:RadFluidContentControl.LargeContent>
        <Border Background="LightGoldenrodYellow">
            <TextBlock Text="LARGE CONTENT" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.LargeContent>
</telerik:RadFluidContentControl>
```

> caption RadFluidContentControl with size 100,100

![WPF RadFluidContentControl RadFluidContentControl with size 100,100](https://www.telerik.com/products/wpf/documentation/assets/c69e0c3f3d9245a17d651f2f7dd1bd35/fluidcontentcontrol-getting-started-0.png)

## Setting up the Content Changing Mechanism

There are two mechanisms for changing the currently visible content. The default one is based on the size of the control. When it reaches a specific size range the content will be change accordingly. The second mechanism is manual. In this case you can manually set the **State** property of the **RadFluidContentControl**.

To enable the size based mechanism set the **ContentChangeMode** property of RadFluidContentControl to **Automatic**. You can control the size thresholds via the following properties.

* **NormalToSmallThreshold**: The maximum size at which the control can be in Small state. When the control reaches this size it enters into Normal state. The default value of the property is *new Size(150, 150)*.

* **NormalToLargeThreshold**: The maximum size at which the control can be in Normal state. When the control reaches this size it enters into Large state. The default value of the property is *new Size(150, 150)*.

> tip The size where the Normal content is visible is the size between NormalToSmallThreshold and NormalToLargeThreshold.

**Example 2: Setting thresholds**

```XAML
<telerik:RadFluidContentControl NormalToSmallThreshold="100,100" 
							 NormalToLargeThreshold="300,300">
    <telerik:RadFluidContentControl.SmallContent>
        <Border Background="Bisque">
            <TextBlock Text="small content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.SmallContent>
    <telerik:RadFluidContentControl.Content>
        <Border Background="Olive">
            <TextBlock Text="Normal content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.Content>
    <telerik:RadFluidContentControl.LargeContent>
        <Border Background="LightGoldenrodYellow">
            <TextBlock Text="LARGE CONTENT" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.LargeContent>
</telerik:RadFluidContentControl>
```

> The default ContentChangeMode default value is set to Automatic.

> caption RadFluidContentControl with size 150,150

![WPF RadFluidContentControl RadFluidContentControl with size 150,150](https://www.telerik.com/products/wpf/documentation/assets/887a8e6df6f26d8547a22dd5a2097124/fluidcontentcontrol-getting-started-1.png)

To enable the manual mechanism set the **ContentChangeMode** property of RadFluidContentControl to **Manual**. This allows you to manually set the **State** property of the control, thus changing the visible content.

**Example 2: Setting the content state manually**

```XAML
<telerik:RadFluidContentControl ContentChangeMode="Manual" State="Large">
    <telerik:RadFluidContentControl.SmallContent>
        <Border Background="Bisque">
            <TextBlock Text="small content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.SmallContent>
    <telerik:RadFluidContentControl.Content>
        <Border Background="Olive">
            <TextBlock Text="Normal content" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.Content>
    <telerik:RadFluidContentControl.LargeContent>
        <Border Background="LightGoldenrodYellow">
            <TextBlock Text="LARGE CONTENT" VerticalAlignment="Center" TextAlignment="Center" />
        </Border>
    </telerik:RadFluidContentControl.LargeContent>
</telerik:RadFluidContentControl>
```

> caption RadFluidContentControl with large content manually set via the state property

![WPF RadFluidContentControl RadFluidContentControl with large content manually set via the State property](https://www.telerik.com/products/wpf/documentation/assets/42e296fb2ecbd2ea4ef7558dfa5ec433/fluidcontentcontrol-getting-started-2.png)

## Data Binding

The Content, SmallContent and LargeContent properties can be data bound to properties from a business object. In this case you can define the views for each state via the **ContentTemplate, SmallContentTemplate** and **LargeContentTemplate** properties. Read more about this in the [Data Binding](https://www.telerik.com/products/wpf/documentation/controls/radfluidcontentcontrol/data-binding) article.

## Telerik UI for WPF Learning Resources

* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Setting a Theme with Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See Also

* [Integration Examples](https://www.telerik.com/products/wpf/documentation/controls/radfluidcontentcontrol/integration-examples)
* [Events](https://www.telerik.com/products/wpf/documentation/controls/radfluidcontentcontrol/events)
* [Transitions](https://www.telerik.com/products/wpf/documentation/controls/radfluidcontentcontrol/transitions)
