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:
You cannot change a normal tile to a minimized or a minimized-expanded state. Instead, you must set the state of a different tile to Maximized, which will minimize the remaining tiles.
If you limit the number of maximized tiles to one, you cannot change the maximized tile to a minimized or minimized-expanded state. Instead, you must set a minimized or minimized-expanded tile’s state to Maximized. However, this does not apply when you have two or more maximized tiles.
You cannot explicitly change a minimized or minimized-expanded tile to a normal state. Instead, you must set the IsMaximized property of all maximized tiles to False or execute the ToggleMaximized command for all maximized tiles.
You can toggle between the minimized or minimized-expanded state if a tile has been minimized using the IsExpandedWhenMinimized property or by executing the ToggleMinimizedExpansion command.
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; } ...