Infragistics® WPF 2016.1
Retrieve a Reference to a Tile

You can add tiles to xamTileManager™ by adding XamTile objects, UIElements and/or data items to its Items collection or by binding xamTileManager to data. Since the xamTileManager offers several different ways to create tiles, casting an item in the Items collection to an instance of a XamTile object may fail. Instead, you should use the TileFromItem method exposed by xamTileManager to retrieve a reference to a XamTile object based on an item in the Items collection or in your data source.

The following example code demonstrates how you can retrieve a reference to a XamTile object.

In XAML:

<ig:XamTileManager Name="xamTileManager1" HeaderPath="Tag">
    <TextBlock Tag="Tile 1" Text="Content Area" />
    <Button Tag="Tile 2" Content="Content Area" />
    <ig:XamTile Header="Tile 3" Content="Content Area" />
</ig:XamTileManager>

In Visual Basic:

Imports Infragistics.Controls.Layouts
...
Dim tile1 As XamTile = _
    Me.xamTileManager1.TileFromItem(Me.xamTileManager1.Items(0))

If tile1 IsNot Nothing Then
    tile1.CloseAction = TileCloseAction.CollapseTile
End If
...

In C#:

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

if (tile1 != null)
{
    tile1.CloseAction = TileCloseAction.CollapseTile;
}
...
Related Topics

About Tile Layout

Add Tiles to xamTileManager

Change the State of 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.