MetropolisUI.Tile.TLiveTile

From XE3 API Documentation
Jump to: navigation, search

System.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTLiveTile

Delphi

TLiveTile = class(TComponent)

C++

class PASCALIMPLEMENTATION TLiveTile : public System::Classes::TComponent

Properties

Type Visibility Source Unit Parent
class public
MetropolisUI.Tile.pas
MetropolisUI.Tile.hpp
MetropolisUI.Tile MetropolisUI.Tile

Description

The TLiveTile component defines the elements of the Windows 8 tiles and allows changing their format and contents at run time.

The component is an HTTP client for the Metropolis UI service (which must be already running) and also requires the proper registry entries. It has a set of properties used only at design time to change the manifest file, to be "packaged" into the Metropolis UI application, plus the configuration information for the two tile descriptors for the square (narrow) and wide tile.

Manifest/Configuration Properties

AppID The unique AppID, a GUID created when the component is initialized. Must be kept in synch with the AppID added to the manifest of the WinRT project. It is used at run time to communicate with the service (it is part of the URL).

Do not change the AppID at run time. At design time, this value is read-only in the Object Inspector. To reset, manually clear the DFM file, then make sure you update and rebuild and re-deploy the tile.

MetropolisAppName The application name added to the Metropolis UI project. Added to the manifest file, not used at run time.
PublisherName The publisher name of the metropolis tile. Added to the manifest file, not used at run time.
CertificateName The publisher certificate name (CN). Added to manifest file, used in the packaging and signing process, not at run time. This must match the certificate used for signing the application, and it is passed as a parameter to the "Deploy Tile" script.
BackgroundColor The background color of the tile. Added to the manifest file (after converting to a Web/Hex value), not used at run time. Blue-violet by default.
IncludeWideTile Specifies whether to use the narrow tile only, or both the narrow and wide tiles. Added to the manifest, but also used at run time to compute the tile XML. Active by default. You should not change it at run time, as the tile configuration is determined in the Metropolis UI application, so the added large tile elements are ignored, or the missing large tile elements make the wide tile "not live".

Dynamic Configuration (Port, URL, Folder)

As the component starts, at run time, it calls ReadRegistryKeys to read the service port from the registry (kept in the private field FServicePort). It also reads the FamilyName, which must have been set by the tile itself and is part of the path where you can place local images. You can access these using:

ImagesFolder The images folder, with the "family name " read from the registry (where it is written by the install script) and the inclusion of the current user folder path.
ServiceTileURL The URL of the service REST calls for the given tile (includes the AppID). Can be used to query the service, asking for the current info, but it is not generally used directly.

When the application starts and ends, it also posts its status information to the registry (the initial post is delayed, because the main form handle is not available until the application has completely started). The startup code also starts a background thread monitoring the registry key that the service uses to communicate back to the Delphi application.

See Also