<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 Name="ButtonRadioButtonOutlineFocus"   Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/radioBTN_focus.png"/>
  <Image Name="ButtonRadioButtonBulletFocus"    Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/radioBTN_focus_doat.png"/>
  <Image Name="ButtonRadioButtonOutlineNoFocus" Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/radioBTN_normal.png"/>
  <Image Name="ButtonRadioButtonBulletNoFocus"  Image="PBDA://2734DC82-774D-4daa-A5AD-2838B5A58127/Microsoft.com/NV/Variable/MCE/Assets/Base64Binary/radioBTN_normal_doat.png"/>

  <UI Name="SimpleRadioButton">

    <Properties>

      <Choice Name="Model" Choice="$Required"/>
      <cor:String Name="Option" String="$Required"/>
      <Size Name="MySize" Size="872,38"/>
      <ICommand Name="Command" ICommand="$Required" />

    </Properties>

    <Locals>

      <!-- React to "click" input. -->
      <ClickHandler Name="Clicker"/>

    </Locals>

    <Rules>

      <Binding Source="[Option]" Target="[Label.Content]"/>
      <Binding Source="[Command]" Target="[Clicker.Command]" />

      <!-- The radio button has been clicked - update the model.-->
      <Changed Source="[Clicker.Invoked]">
        <Actions>
          <Set Target="[Model.Chosen]" Value="[Option]"/>
        </Actions>
      </Changed>

      <!-- Highlighted = no; Checked = yes-->
      <Rule>
        <Conditions>
          <Equality Source="[Input.KeyFocus]" ConditionOp="Equals" Value="false"/>
          <Equality Source="[Model.Chosen]" ConditionOp="Equals" Value="[Option]"/>
        </Conditions>
        <Actions>
          <Set Target="[Box.Content]" Value="image://me:ButtonRadioButtonBulletNoFocus"/>
        </Actions>
      </Rule>

      <!-- Highlighted = yes; Checked = yes-->
      <Rule>
        <Conditions>
          <Equality Source="[Input.KeyFocus]" ConditionOp="Equals" Value="true"/>
          <Equality Source="[Model.Chosen]" ConditionOp="Equals" Value="[Option]"/>
        </Conditions>
        <Actions>
          <Set Target="[Box.Content]" Value="image://me:ButtonRadioButtonBulletFocus"/>
        </Actions>
      </Rule>

      <!-- Highlighted = no; Checked = no-->
      <Rule>
        <Conditions>
          <Equality Source="[Input.KeyFocus]" ConditionOp="Equals" Value="true"/>
          <Equality Source="[Model.Chosen]" ConditionOp="NotEquals" Value="[Option]"/>
        </Conditions>
        <Actions>
          <Set Target="[Box.Content]" Value="image://me:ButtonRadioButtonOutlineFocus"/>
        </Actions>
      </Rule>

    </Rules>

    <Content>

      <Panel MaximumSize="[MySize]" MinimumSize="[MySize]" Layout="Form">
        <Children>

          <Graphic Name="Box" Content="image://me:ButtonRadioButtonOutlineNoFocus" MaximumSize="38,38" MinimumSize="38,38">
            <LayoutInput>
              <FormLayoutInput Left="Parent, 0, 0" Top="Parent, 0, 0"/>
            </LayoutInput>
          </Graphic>
          <Text Name="Label" Color="White" Font="font://myresources:ContentTextF" WordWrap="true">
            <LayoutInput>
              <FormLayoutInput Left="Box, 1, 3" Top="Parent, 0, 0"/>
            </LayoutInput>
          </Text>

        </Children>
      </Panel>

    </Content>
  </UI>

  <UI Name="SimpleRadioButtonGroup">

    <Properties>
      <Choice Name="Model" Choice="$Required" />
      <cor:String Name="RadioSpace" String="$Required"/>
      <Size Name="EntrySize" Size="872,38"/>
      <Command Name="Command"/>
    </Properties>

    <Rules>
      <Binding Source="[Model.Options]" Target="[Repeater.Source]" />
    </Rules>

    <Content>

      <Panel Name="RootPanel" Layout="VerticalFlow">
        <Children>

          <Repeater Name="Repeater" ContentName="RadioButton" >
            <Layout>
              <FlowLayout Orientation="Vertical" Spacing="[RadioSpace!MajorMinor]" ItemAlignment="Near" AllowWrap="true" />
            </Layout>
          </Repeater>

        </Children>
      </Panel>

    </Content>

    <Content Name="RadioButton">
      <me:SimpleRadioButton Model="[Model]" Option="[RepeatedItem!cor:String]" MySize="[EntrySize]" Command="[Command]"/>
    </Content>

  </UI>

</Mcml>
