<Mcml
    xmlns="http://schemas.microsoft.com/2008/mcml"
    xmlns:cor="assembly://MSCorlib/System"
    xmlns:addin="assembly://Microsoft.MediaCenter/Microsoft.MediaCenter.Hosting"
    <PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/GPNVSCMD.do?cmd=AddResourceFile;name=xmlns:myresources;content=PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/Resource/Resources_%cc.mcml/>
  xmlns:me="Me">

  <!-- Image -->
  <Image Name="Background" Image="PBDA://2734dc82-774d-4daa-a5ad-2838b5a58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/COMMON.BACKGROUND.decoded.png"/>
  <Image Name="Background1" Image="PBDA://2734dc82-774d-4daa-a5ad-2838b5a58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/bg2.decoded.png"/>
  <Image Name="Background2" Image="PBDA://2734dc82-774d-4daa-a5ad-2838b5a58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/bg2.decoded.png"/>
  <Image Name="BG_arrow" Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/BG_arrow.png"/>
  <Image Name="NofocusedNaviButton" Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/COMMON.BUTTON.FIRSTRUN.DORMANT.FULL.decoded.png"/>
  <Image Name="FocusedNaviButton" Image="PBDA://2734dc82-774d-4daa-a5ad-2838b5a58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/COMMON.BUTTON.LEFT.FOCUS.decoded.png"/>
  <Image Name="PressedNaviButton" Image="PBDA://2734dc82-774d-4daa-a5ad-2838b5a58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/COMMON.BUTTON.LEFT.FOCUSOVERLAY.decoded.png"/>
 
  <Color Name="TitleColor" Color="160, 209, 252"/>
  
  <!-- FirstRun page. Settings is same, except for text. -->
  <UI Name="FirstRunPage">
    <Properties>
      <addin:PageSession Name="Session" PageSession="$Required"/>
    </Properties>

    <Locals>
      <addin:AddInHost Name="AddInHost"/>

      <cor:Int32 Name="SessionResult" Int32="0"/>
      <cor:String Name="Uri_FindSTB" String="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/Resource/FindSTB.mcml"/>
      

      <Timer Name="MyTimer" Interval="1000"
             AutoRepeat="true" Enabled="true"/>
      <cor:String Name="myString" String=""/>
      
      <Choice Name="WaitDots" Wrap="true">
        <Options>
          <cor:String String="" />
          <cor:String String="." />
          <cor:String String=".." />
          <cor:String String="..." />
        </Options>
      </Choice>

    </Locals>

    <Rules>
      <Changed Source="[MyTimer.Tick]">
        <Actions>
          <Invoke Target="[myString.Concat]"
                  str0="global://myresources:str_2_12_4" str1="[WaitDots.Chosen!cor:String]"
                  ResultTarget="[WaitMessage.Content]"
                  ExclusiveApply="false"
                  InvokePolicy="Synchronous" />

          <Invoke Target="[WaitDots.NextValue]" />

          <!--<Set Target="[DataHost.Source]" Value="[Uri_FindSTB]"/>-->
          <Invoke Target="[DataHost.ForceRefresh]" />
        </Actions>
      </Changed>

    </Rules>

    <Content>
      <Panel Name="BGPanel" Layout="Form" Margins="0, 0, 0, 0">
        <LayoutInput>
          <FormLayoutInput Horizontal="Center" Vertical="Center"/>
        </LayoutInput>
        <Children>
          <Panel Name="MainPage" MaximumSize="1024,768" MinimumSize="1024,768" Layout="Form" >
            <Children>
              
              <!-- 主標題 -->
              <Text Name ="Title" Content="global://myresources:str_2_12_1" Color="color://me:TitleColor" Font="font://myresources:TitleFontF">
                <LayoutInput>
                  <FormLayoutInput Left="Parent, 0, 73" Top="Parent, 0, 48"/>
                </LayoutInput>
              </Text>
              <!-- 副標題 -->
              <Text Name ="SubTitle" Content="global://myresources:str_2_12_2" MaximumSize="872,0" MinimumSize="872,0" Color="255, 255, 255" Font="font://myresources:SubTitleFontF" WordWrap="true">
                <LayoutInput>
                  <FormLayoutInput Left="Parent, 0, 73" Top="Parent, 0, 146"/>
                </LayoutInput>
              </Text>
              
              <!-- 內文 -->
              <Panel Name="MainText" MaximumSize="872,460" MinimumSize="872,460" Layout="Form" >
                <LayoutInput>
                  <FormLayoutInput Left="Parent, 0, 73" Top="SubTitle, 1, 38"/>
                </LayoutInput>
                <Children>
                  <Text Name="Paragraph 1"
                        Content="global://myresources:str_2_12_3"
                        Color="color://me:TitleColor" Font="font://myresources:ContentTextF"
                        MaximumSize="872, 0" MinimumSize="872, 0" WordWrap="true">
                    <LayoutInput>
                      <FormLayoutInput Left="Parent, 0, 0" Top="Parent, 0, 0"/>
                    </LayoutInput>
                  </Text>

                  <Text Name="WaitMessage" Content="global://myresources:str_2_12_4" MaximumSize="872,0" MinimumSize="872,0" Color="color://me:TitleColor" Font="font://myresources:ContentTextF" WordWrap="true">
                    <LayoutInput>
                      <FormLayoutInput Left="Parent, 0, 0" Top="Paragraph 1, 1, 38"/>
                    </LayoutInput>
                  </Text>
                  
                </Children>
              </Panel>
              
              <!--An arrow on the background-->
              <Graphic Alpha="0.3" Content="image://me:BG_arrow">
                <LayoutInput>
                  <FormLayoutInput Left="Parent, 0, 644" Top="Parent, 0, 186"/>
                </LayoutInput>
              </Graphic>
            </Children>
          </Panel>

          <me:Background Name="Background"/>
          <me:DataHostFromDriver Name="DataHost" ThrowOnLoadError="false" Source="[Uri_FindSTB]"/>
          
        </Children>
      </Panel>

    </Content>

  </UI>

  <UI Name="Background">
    <Content>
      <Panel Layout="Anchor">
        <Children>
          <Graphic Content="image://me:Background1" Alpha="1" MaximumSize="0,110" MinimumSize="0,110" >
            <LayoutInput>
              <AnchorLayoutInput Top="Parent,0"/>
            </LayoutInput>
          </Graphic>
          <Graphic Content="image://me:Background2" Alpha="1" MaximumSize="0,110" MinimumSize="0,110" >
            <LayoutInput>
              <AnchorLayoutInput Bottom="Parent,1"/>
            </LayoutInput>
          </Graphic>
          <Graphic Content="image://me:Background" Layout="Fill" Alpha="1"/>

        </Children>
      </Panel>
    </Content>
  </UI>

  <UI Name="DataHostFromDriver"/>
  
</Mcml>
