Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
LiveTileView change the Tile Text and Color on RunTime
posted

Hi All,

I'm using UltraLiveTileView with Groups and Tiles. I want to change the Text of a Tile and it's color based on the Text input.

Please help me. Thanks in advance.

Thanks,

Manikandan M

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Manikandan,

    How you do this depends on what kind of tile you are dealing with. Is it a static tile or a live tile. What size is the tile? If it's a tile that supports multiple sizes, then you might have to change the background color in multiple places, depending on how the tile was originally set up.

    In a very simple case of a static tile with no appearances applied initially, you would do something like this:

                StaticTile tile = this.ultraLiveTileView1.Groups[1].Tiles[0] as StaticTile;
                tile.Appearance.Normal.BackColor = Color.Red;
                tile.Appearance.Normal.BackGradientStyle = Infragistics.Win.GradientStyle.None;
                tile.CurrentView.Text = "New Text";

    For a live tile, it would be more complicated, since the tile might include more than one text element. You would have to look at the Content property on the tile and modify the appropriate element. If you installed the samples along with the suite, there's a sample called LiveTileViewCS (under Legacy Samples) that adds a whole bunch of different types of tiles at run-time, so you could take a look at the sample code and see how it works.

Children
No Data