Working with NowPlaying

To display the Now Playing inset in MCML, use the NowPlaying view item. This functionality is controlled by the Windows Media Center API.

The NowPlaying element is used only for positioning and it does not respond to animations or transforms such as scaling or rotation. Rather, the NowPlaying view item indicates where Windows Media Center should place the Now Playing inset.

The NowPlaying element has a few configuration options:

  • The ShowFullMetadata attribute indicates whether to size the inset to display metadata. When this attribute is set to "Always", the minimum size of the inset is 735 x 132 pixels. When set to "Never", the inset requires 176 x 132 pixels. If you override the default minimum size, be careful to allow adequate space or the view item may not be displayed correctly or may not be displayed at all.
  • The SnapToDefaultPosition specifies whether to position the Now Playing inset in the same location, with the same size, as the Now Playing UI within Media Center.

The following example shows how to use the NowPlaying view item (for additional examples, see the Sample Explorer):

<Mcml xmlns="https://schemas.microsoft.com/2008/mcml">
  <UI Name="MediaCenterServices">
    <Content>
      <Panel Layout="Form">
        <Children>
          <!-- Place the Now Playing UI at the bottom left of the screen. -->
          <NowPlaying ShowFullMetadata="OnFocus" SnapToDefaultPosition="true">
            <LayoutInput>
              <FormLayoutInput Left="Parent,0" Bottom="Parent,1"/>
            </LayoutInput>
          </NowPlaying>
        </Children>
      </Panel>
    </Content>
  </UI>
</Mcml>

Sample Explorer

  • View Items – NowPlaying > all samples

See Also