Back to Devexpress

Tile.ContentSource Property

wpf-devexpress-dot-xpf-dot-layoutcontrol-dot-tile-dfee790f.md

latest2.7 KB
Original Source

Tile.ContentSource Property

Gets or sets the content source. This is a dependency property.

Namespace : DevExpress.Xpf.LayoutControl

Assembly : DevExpress.Xpf.LayoutControl.v25.2.dll

NuGet Package : DevExpress.Wpf.LayoutControl

Declaration

csharp
public IEnumerable ContentSource { get; set; }
vb
Public Property ContentSource As IEnumerable

Property Value

TypeDescription
IEnumerable

An object that enumerates contents for the tile.

|

Remarks

A tile can display varying content specified by the ContentSource property. The tile’s content is changed automatically at the time interval specified by the Tile.ContentChangeInterval property. If the Tile.AnimateContentChange option is enabled, an animation is played each time the tile’s content changes.

Example

This example shows how to define varying content using the Tile.ContentSource property. The content change interval is set to 1 second. The Tile.AnimateContentChange option is enabled to play an animation each time the tile’s content changes.

The animation below shows the result:

xaml
<dxlc:TileLayoutControl Background="White" Name="tileLayoutControl1">
            <dxlc:Tile Name="tile1" Size="Small" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                       AnimateContentChange="True" ContentChangeInterval="00:00:01">
                <dxlc:Tile.ContentSource>
                    <dx:FrameworkElements>
                        <Image Source="Images/Research.png" Stretch="None" />
                        <Image Source="Images/System.png" Stretch="None" />
                        <Image Source="Images/Statistics.png" Stretch="None" />
                    </dx:FrameworkElements>
                </dxlc:Tile.ContentSource>
            </dxlc:Tile>
        </dxlc:TileLayoutControl>

See Also

Tile Class

Tile Members

DevExpress.Xpf.LayoutControl Namespace