Markup Namespaces

MCML files contain a mapping to a Windows Media Center namespace, which is a reference to the Microsoft.MediaCenter.UI assembly. You can indicate the default namespace by using the xmlns attribute in the root <Mcml> tag. The alias for the Microsoft.MediaCenter.UI assembly is "https://schemas.microsoft.com/2008/mcml".

The following statement is typically how an MCML document begins:

<Mcml xmlns="https://schemas.microsoft.com/2008/mcml">

Any tag without a prefix is assumed to be from the default namespace.

The "me" namespace is used to reference other resources in the same markup document. For example:

<Mcml
  xmlns="https://schemas.microsoft.com/2008/mcml"
  xmlns:me="Me">

In the example below, the MainUI includes a reference to another UI that is defined later in the MCML document:

<Mcml xmlns="https://schemas.microsoft.com/2008/mcml" 
      xmlns:me="Me">

  <UI Name="MainUI">
    <!-- The first UI is displayed. -->
    <Content>
      <!-- This is a reference to the next UI. -->
      <me:SimpleUI_1 />
    </Content>
  </UI>

  <UI Name="SimpleUI_1">
    <Content>
      <Text Content="This text is displayed because the first UI references it."
            Color="Red" Font="Verdana,12" />
    </Content>
  </UI>

  <UI Name="SimpleUI_2">
    <Content>
      <Text Content="This text is not displayed."
            Color="Blue" Font="Verdana,12" />
    </Content>
  </UI>

</Mcml>

See Also