entrypoint Element
Defines an entry point into an application designed to be used within Windows Media Center. This element is a child of the application element.
Syntax
<entrypoint
id="entry point GUID"
<!-- This element can have only one of the following attributes:
addin="AssemblyInfo"
url="URL of entry-point page"
run="path of EXE file"
-->
title="title"
nowPlayingDirective="{close | pause | stop | mute}"
description="description"
imageUrl="URL of image"
inactiveImageURL="URL of image"
context="context"
UiFlags="HideTransportToolbar"
AcceptWebInvoke="{true | false}"
>
</entrypoint>
Attributes
id
Required. A string in the form of a globally unique identifier (GUID). This should be different from the GUID created for the application element and not a slight variation of another GUID. To generate GUIDs for your application, use a GUID-generating utility such as guidgen.exe from Microsoft.
addin
A comma-separated string that defines the attributes of a managed code assembly. For a Windows Media Center application (local or background), the string is in the following format:
"className,assemblyName,Version=version,PublicKeyToken=publicKey,Culture=culture"
where:
className is the full name (assembly and class) of the application's implementation of a class that inherits from the IAddInModule interface.
assemblyName is the name of the application's assembly.
version is the version number of the application's assembly.
publicKey is the public portion of the cryptographic key used to sign the application's assembly. Use the Strong Name tool (sn.exe) with the -p option to extract the public portion of the cryptographic key from your .snk file. For more information, see Strong Name Tool (Sn.exe) on the MSDN web site.
culture is the cultural designation of the application's assembly.
The version, publicKey, and culture values must be an exact match with the strong-name information stored in the application's assembly. For more information, see Creating a Strong-Named Assembly.
For a Windows Media Center web application, this attribute must be "Microsoft.MediaCenter.Hosting.WebAddIn,Microsoft.MediaCenter"
.
url
A string that specifies the path to an entry point page in the application. The value for url must contain "http://".
run
A string that specifies the full or relative path to an executable file on the local computer.
title
Required. A string that identifies the entry point in the Windows Media Center UI and contains a short summary of the entry point (for example, "New Releases"). It appears at the top of the Extras Library page when the entry point is selected.
nowPlayingDirective
Optional. A string that sets the state of the currently playing media/Now Playing view item (NowPlaying element in MCML) when the entry point is launched. Whenever possible, an application should set these values from code, script, or MCML. Choose from the following values:
Value | Description |
close | The shared view port/Now Playing experience is closed. |
pause | The media is paused. |
stop | The media is stopped. |
mute | The media is muted. |
description
Optional. A string that describes the purpose of the entry point to provide additional information to the user (for example, "The latest tracks from your favorite artists").
imageUrl
Optional. A string that specifies the path to a Portable Network Graphics (PNG) format image displayed in the Windows Media Center UI. The application image is a 186 x 186 pixel PNG bitmap with support for alpha transparency. Windows Media Center automatically and proportionally scales this image as appropriate within the UI. If you do not specify an image, a Windows Media Center generic image or the title of the application is used instead. While it is possible for the same image to be used for any number of entry points, best practice recommends a customized image for each entry point that is specific to the type (differentiate between disparate media types, for example).
inactiveImageURL
Optional. A string that specifies the path to a Portable Network Graphics (PNG) format image displayed in the Windows Media Center UI with the same characteristics as imageURL. The inactive image appears on the Windows Media Center Start menu strip when the tile is not selected. If this image is not specified, a grayscale version of imageURL is used instead.
context
Optional. An application-defined string that Windows Media Center provides to the application when the entry point is selected. This can be an arbitrary set of parameters for the application. For a Windows Media Center web application, this attribute is set to the HTTP URL of the application.
UiFlags
Optional. A comma-delimited string used to affect certain Windows Media Center UI features. The only option is "HideTransportToolbar", which hides the mouse transport controls (this toolbar is located in the lower-right corner of the Windows Media Center UI, which appears when the user moves the mouse, includes buttons to perform actions such as pausing, stopping, and rewinding). This flag should be used only in extremely rare cases, because when this toolbar is hidden, mouse-only users will be unable to control media playback while using the application. Only applicable for hosted HTML experiences.
AcceptWebInvoke
If true, can be launched from a web application.
Remarks
This element can have only one of the following attributes, which determines how it behaves:
- addin
- url
- run
This element is for use with the ApplicationContext.RegisterApplication method.
Example Code
<entrypoint id="{B4A74AD0-3BE2-43d8-A738-82398887FAA6}"
addin="Microsoft.MediaCenter.Hosting.WebAddIn,Microsoft.MediaCenter"
title="Start Menu Tile Title"
description="Start Menu Tile Description"
imageURL="ImageFocus.png"
inactiveImageURL="ImageNonFocus.png"
context="http://mywebsite/Default.mcml">
Requirements
Platform: Windows XP Media Center Edition 2005 and later
See Also