Patchou's Cabana

The personal blog of Patchou

MCT Documentation – New Theme & Formatting

< back to Media Center Themer’s documentation index

Once you’ve tried changing the default colors defined in Media Center Themer a couple of time, questions like "how can I change another color I see in Media Center?", "how can I start my own theme?" or "how do I specify a different font for my text?" may pop into your head. This page intends to answer these questions for you.

The XML Schema

In the previous section of this documentation, you’ve seen how to change the color of the text. You also read about changing the font and using more conditions for your new attributes: let’s see how to actually use all these attributes. Almost everything that controls the behavior of Media Center Themer can be specified in the configuration XML file. The matching documentation for this file can be found in MCTSchema.xsd, an XML schema file. If you’re not familiar with xsd/dtd files, you should lnow that they’re used primarily to validate an XML file. For example, if you were to add a<Blablabla> element anywhere in the configuration file of Media Center Themer and try to validate it with an XML editor, you would get an error telling you that element <Blablabla> is unknown and cannot be defined.

Every element and attribute supported by Media Center Themer is described in the schema’s documentation (included in the documentation distributed with the software). For instance, here’s a list of the attributes you can set in the Text elements of TextFormat:

  • <Text>attributes
    • Color: Original color of the text. Needs to be expressed as RGB(r,g,b) where r, g and b are values between 0 and 255. No alpha channel can be specified (all transparency levels will match).
    • Font: Original name of the font used to display the text. Can also be an internal name only used by Media Center.
    • Height: Original size of the text, in points (pt).
  • <Replace> attributes in <Text>
    • Color: New color of the text. Needs to be expressed as RGB(r,g,b) where r, g and b are values between 0 and 255. No alpha channel can be specified, Media Center will apply transparency independently of this attribute.
    • Font: New font for the text. This needs to be a font currently registered in the system.
    • Height: New size for the text, in points (pt).
    • Bold: Set to “true” to display the text in bold.

Your Own Theme File

Before continuing with this documentation, it is highly recommended that you create a new file for your theme. MCTDefault.xml is, as its name implies, a file with default values. As such, it is susceptible to be replaced when Media Center Themer is upgraded, removed when the themer is uninstalled, etc… for these reasons, using a file with a different name will insure that your work is safe from external alterations. Here are the steps to perform:

  • Open a file explorer and navigate to Media Center Themer’s data directory C:\ProgramData\Media Center Themer).
  • Create a directory for your theme. For the example, we’ll call it MyTheme.
  • Copy MCTDefault.xml in your new theme’s directory (C:\ProgramData\Media Center Themer\MyTheme).
  • Rename the file in the theme’s directory to something else, for example MyThemeFile.xml.

Your new theme is now ready to be used. You’ll soon fill your directory with pictures and other files related to your theme. To instruct Media Center Themer to load your the new file instead of the default one, open the registry editor, navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Patchou\Media Center Themer" and change the ThemeFile value to "MyTheme\MyThemeFile.xml" (the path to your theme file, relative to Media Center Themer’s own data directory). You can start Media Center to ensure all is working as expected.

Text Formatting – Mixing Conditions

Let’s start with a simple example:, you want to change the color of all the text displayed with the font “Segoe Media Center Light” to red. To achieve this, you would add the following element at the top of your configuration file:

<Text Font="Segoe Media Center Light">
	<Replace Color="rgb(255,0,0)"/>
</Text>

If you start Media Center in Windows 7 with these parameters in your configuration file, you should see all the big menu titles on the welcome screen displayed in red. Now, let’s say you only want the currently selected menu to be displayed in red. Because the current menu is displayed by default in white (242,242,242) while the other menus are displayed by default in light blue (151,217,255), all you would need to do is add an extra condition on the text color, like this:

<Text Color="rgb(242,242,242)" Font="Segoe Media Center Light">
	<Replace Color="rgb(255,0,0)"/>
</Text>

Just remember that different Text blocks never combine, the first one found with a matching condition is the only one used for each given piece of text. For instance, if you wanted to change the color of all the text displayed in light blue to green and have the remaining “Segoe Media Center Light” text displayed in red, you would need to write your conditions in this order:

<Text Color="rgb(151,217,255)">
	<Replace Color="rgb(0,255,0)"/>
</Text>
<Text Font="Segoe Media Center Light">
	<Replace Color="rgb(255,0,0)"/>
</Text>

If you run Media Center with these parameters, you will see that all the menu titles are green (replaced from light blue) with the exception of the currently selected menu that’s red (only remaining text on the welcome screen displayed with the “Segoe Media Center Light” font). Now, if you invert those two Text elements and restart Media Center, you will see that all the titles are now displayed in red. That’s because the first condition is now “is the text displayed with Segoe Media Center Light?” and as this applies to both selected and non-selected menu items, the color red is applied immediately and no other condition is analyzed. To see more examples of possible combinations, check out the Samples page.

All you need to do now is read the logging & settings page and you’ll be ready to change the remaining resources of Media Center.

  • Archive

  • Categories

  • Blogroll