Infragistics® WPF 2016.1
Change the State of a Tile

A XamTile object can be in one of four states at any given time -- Normal, Maximized, Minimized, or MinimizedExpanded. Based on the state of its tiles, the xamTileManager™ can be in one of two 'modes'; maximized or normal mode. Normal mode only contains normal tiles; while maximized mode contains one or more maximized tiles with the remaining minimized or minimized-expanded tiles aligned to an edge of the control. Most of the time, your end users will interact with a tile to change its state, which can be obtained from the read-only property State; however, you can also change the state of a tile in XAML or in the code-behind by setting several of the XamTile object's properties - IsExpandedWhenMinimized, IsMaximized. Please refer to the "Tile State" sample to see how to change a tile state using commands.

When changing a XamTile state, you should be aware of the following behaviors when changing a tile's state:

The following example code demonstrates how to change the state of a tile.

In XAML:

<ig:XamTileManager Name="xamTileManager1">
    <ig:XamTile Header="Tile 1" IsMaximized="True" />
    <ig:XamTile Header="Tile 2" />
    <ig:XamTile Header="Tile 3" />
</ig:XamTileManager>

In Visual Basic:

Imports Infragistics.Controls.Layouts
...
Dim tileToMaximize = _
    Me.xamTileManager1.TileFromItem(Me.xamTileManager1.Items(0))

If tileToMaximize IsNot Nothing Then
    tileToMaximize.IsMaximized = True
End If
...

In C#:

using Infragistics.Controls.Layouts;
...
XamTile tileToMaximize =
    this.xamTileManager1.TileFromItem(this.xamTileManager1.Items[0]);

if (tileToMaximize != null)
{
    tileToMaximize.IsMaximized = true;
}
...
Related Topics

About Tile Layout

Add Tiles to xamTileManager

Retrieve a Reference to a Tile

About Saving and Loading Layouts

About Tile Templates

Binding xamTileManager to Data

Explicitly Arrange Tiles

Allow End Users to Close Tiles

Restrict a XamTile's Size

Modify Tile Behaviors in Normal Mode

Modify Tile Behaviors in Maximized Mode

About Animations

 

 


Copyright © 2008-2016 Infragistics, Inc. All rights reserved.

E-mail your feedback on this topic.