Version

SetState(TileState,Boolean) Method

Puts the UltraTile in the specified state.
Syntax
'Declaration
 
Public Function SetState( _
   ByVal newState As TileState, _
   ByVal shouldAnimate As Boolean _
) As Boolean
public bool SetState( 
   TileState newState,
   bool shouldAnimate
)

Parameters

newState
The new state into which the tile should be placed.
shouldAnimate
Indicates whether the tile should animate changing its state.

Return Value

True if the tile's state was successfully changed; False otherwise.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionnewState is not a member of the TileState enumeration.
System.InvalidOperationExceptionThe UltraTile does not currently belong to an UltraTilePanel.
Example
The following code demonstrates how to change the state of an UltraTile in code.

Imports System.Windows.Forms
Imports Infragistics.Win
Imports Infragistics.Win.Misc

' Get the first tile in the UltraTilePanel
Dim tile As UltraTile = Me.UltraTilePanel1.Tiles(0)

' If the first tile is not in the Large state, animte it changing to the Large state.
If Not tile.State = TileState.Large Then
    tile.SetState(TileState.Large, True)
End If
using System.Windows.Forms;
using Infragistics.Win;
using Infragistics.Win.Misc;

// Get the first tile in the UltraTilePanel
UltraTile tile = this.ultraTilePanel1.Tiles[ 0 ];

// If the first tile is not in the Large state, animte it changing to the Large state.
if ( tile.State != TileState.Large )
	tile.SetState( TileState.Large, true );
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also