Version

Styling WinLiveTileView

Topic Overview

Purpose

This topic demonstrates how to style the WinLiveTileView™ control using the designer, in code-behind and AppStylist .

Required background

The following topic is required as a prerequisite to understanding this topic.

Topic Purpose

This topic demonstrates how to add the UltraLiveTileView control and tiles using the designer interface.

Overview

Overview

The WinLiveTileView control provides different ways to style the appearances of the tiles and other visual elements.

The WinLiveTileView also supports AppStylist that you can use to create a style library file with desired styles for the elements and save it as a theme file for your WinLiveTileView control.

Styling the WinLiveTileView

Styling tiles

For using the WinLiveTileView designer, please refer to the Required background section before you continue, as this section assumes that you already familiar using the designer interface to create a tile.

Open the WinLiveTileView ’s designer and add a medium tile to the control layout.

WinLiveTileView Styling 1.png

Select the tile, click the Properties tab, and then expand the Appearance property in the property grid.

WinLiveTileView Styling 2.png

Each tile exposes the four Appearance properties outlined above:

Property Description

Active

When a tile is active using the keyboard navigation (press Ctrl key, and use the arrow keys).

HotTracking

When moving the mouse pointer over the tile.

Normal

The tile displays without any additional user interactions.

Selected

When the tile is selected showing a checkmark on its upper-right corner.

The following screenshot illustrates one of the appearance settings (HotTracking) as the others are similar.

Note
Note:

If you are using a solid color, then either disable the BackGradientStyle and set only the BackColor, or set both BackColor and BackColor2, because the BackGradientStyle requires both.

WinLiveTileView Styling 3.png

Code example

The following code example demonstrates styling the tile’s background in code-behind by obtaining a reference of the group and the tile within that group.

In C#:

LiveTile liveTile = (LiveTile)ultraLiveTileView1.Groups[“Group 1”].Tiles[“mediumTile1”];
liveTile.Appearance.HotTracking.BackColor = Color.YellowGreen;
liveTile.Appearance.HotTracking.BackGradientStyle = GradientStyle.None;

In Visual Basic:

Dim liveTile As LiveTile = DirectCast(ultraLiveTileView1.Groups(“Group 1”).Tiles(“mediumTile1”), LiveTile)
liveTile.Appearance.HotTracking.BackColor = Color.YellowGreen
liveTile.Appearance.HotTracking.BackGradientStyle = GradientStyle.None

Styling the Groups

Group appearance

The WinLiveTileView groups expose a slightly different set of properties, including tile collections and capability to set style for all tiles within that group.

WinLiveTileView Styling 4.png

Code example

The following code example demonstrates styling the group appearance (Border and BackColor) in code-behind by obtaining a reference of the group with key.

In C#:

TileGroup tileGroup = (TileGroup) ultraLiveTileView1.Groups["Group 1"];
tileGroup.Appearance.Normal.BorderColor = Color.Red;
tileGroup.Appearance.Normal.BackGradientStyle = GradientStyle.None;
tileGroup.Appearance.Normal.BackColor = Color.FromArgb(128, 128, 255);

In Visual Basic:

Dim tileGroup As TileGroup = DirectCast(ultraLiveTileView1.Groups("Group 1"), TileGroup)
tileGroup.Appearance.Normal.BorderColor = Color.Red
tileGroup.Appearance.Normal.BackGradientStyle = GradientStyle.None
tileGroup.Appearance.Normal.BackColor = Color.FromArgb(128, 128, 255)

Group text appearance

The following code example demonstrates styling the group text appearance (Border and BackColor) in code-behind by obtaining a reference of the group with key.

WinLiveTileView Styling 5.png

Code example

The following code example demonstrates styling the group text appearance (Border, ForeColor and BackColor) in code-behind by obtaining a reference of the group with key.

In C#:

TileGroup tileGroup = ultraLiveTileView1.Groups["Group 1"];
tileGroup.TextAreaAppearance.Normal.BackColor = Color.YellowGreen;
tileGroup.TextAreaAppearance.Normal.BorderColor = Color.Orange;
tileGroup.TextAreaAppearance.Normal.ForeColor = Color.Blue;

In Visual Basic:

Dim tileGroup As TileGroup = ultraLiveTileView1.Groups("Group 1")
tileGroup.TextAreaAppearance.Normal.BackColor = Color.YellowGreen
tileGroup.TextAreaAppearance.Normal.BorderColor = Color.Orange
tileGroup.TextAreaAppearance.Normal.ForeColor = Color.Blue

Group tile appearance

The group contains a collection of tiles; consequently, changes made to setting the group’s tile appearance properties, apply to all tiles within that group.

WinLiveTileView Styling 6.png

Code example

The following code example demonstrates styling the group tile appearance (ForeColor) in code-behind by obtaining a reference of the group with key. This setting applies to all tiles in the group.

In C#:

TileGroup tileGroup = ultraLiveTileView1.Groups["Group 1"];
tileGroup.TileAppearance.Normal.ForeColor = Color.Yellow;

In Visual Basic:

Dim tileGroup As TileGroup = ultraLiveTileView1.Groups("Group 1")
tileGroup.TileAppearance.Normal.ForeColor = Color.Yellow

Styling WinLiveTileView Using the AppStylist

Styling the WinLiveTileView using AppStylist

The WinLiveTileView component supports AppStylist , providing you with several styling option, such as using one of the pre-defined style library files; or one of the existing templates and customizing it with a different look; or even creating your own library file using the AppStylist .

For more information, please refer to the Setting Up Your Application for Styling topic on how to create style library files with AppStylist for LiveTileView or any other Ultimate UI for Windows Forms controls in general.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

The topics in this group introduce the latest WinLiveTileView control, along with instructions on its use and configuration. This control is similar to Microsoft 8 operating system’s tiles start screen.