<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX 
  xmlns="http://schemas.microsoft.com/2007/uix"
  xmlns:styles="res://ZuneShellResources!Styles.uix"
  xmlns:anim="res://ZuneShellResources!Animations.uix"
  xmlns:popup="res://ZuneShellResources!Popup.uix"
  xmlns:me="Me"
  >
  
  
  
  
  

  <Class Name="ToolTip" Base="popup:Popup">
    <Properties>
      <PopupLayoutInput Name="LayoutInput" Placement="MouseBottom" />
      <String Name="PopupUI" String="res://ZuneShellResources!ToolTip.uix#ToolTipUI"/>
      <Int32 Name="AutoHideDelay" Int32="5000"/>
      <Font Name="Font" Font="{styles:SharedStyles.ToolTipStyle.Font}"/>
    </Properties>
    <Scripts>
      <Script>
        Helper.DismissOnMouseDown = true;
        Helper.DismissOnWindowDeactivate = true;
      </Script>
      <Script>Helper.AutoHideDelay = [AutoHideDelay];</Script>
    </Scripts>
  </Class>

  <Class Name="ToolTipConstants" Shared="true">
    <Properties>
      <Point Name="InversePadding" Point="-5,-3"/>
    </Properties>
  </Class>

  <UI Name="ToolTipUI" Base="popup:PopupUI">
    <Properties>
      <String Name="ContentUI" String="res://ZuneShellResources!ToolTip.uix#ToolTipContentUI"/>
      
      
      <me:ToolTip Name="Popup" ToolTip="$Required" />
    </Properties>

    <Scripts>
      <Script>
        if (ContentUI != null)
          Host.RequestSource(ContentUI, "Model", Model, "ToolTip", Popup);
      </Script>
    </Scripts>

    <Content>
      
      
      
      <Graphic Content="{styles:Styles.ToolTipDropShadow}" Padding="5,3,5,5" SizingPolicy="SizeToChildren">
        <Animations>
          <Animation Animation="{anim:Animations.MenuFadeIn}"/>
          <Animation Animation="{anim:Animations.MenuFadeOut}"/>
        </Animations>
        <Children>

          <Host Name="Host"/>

        </Children>
      </Graphic>
    </Content>
  </UI>

  <UI Name="ToolTipContentUI">
    <Properties>
      <String Name="Model" String="$Required"/>
      <me:ToolTip Name="ToolTip" ToolTip="$Required" />
    </Properties>

    <Locals>
      <Accessible Name="Accessible"/>
    </Locals>

    <Scripts>
      <Script>Text.Content = [Model];</Script>

      <Script>
        if ([Accessible.Enabled])
        {
          Accessible.Name = [Model];
          Accessible.Role = AccessibleRole.ToolTip;
        }
      </Script>
    </Scripts>

    <Content>
      <Text Name="Text" Font="{ToolTip.Font}" Color="{styles:SharedStyles.ToolTipStyle.Color}" WordWrap="true"/>
    </Content>
  </UI>

</UIX> 
