<Page x:Class="PageState.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:PageState" 
    Title="Guess"
    WindowTitle="Guess A Number!">
  <StackPanel Margin="10">
    <Label>Please guess a number between 0 and 2147483647:</Label>
    <TextBox ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}">
      <TextBox.Text>
        <Binding Path="Guess">
          <Binding.ValidationRules>
            <local:PositiveInteger />
          </Binding.ValidationRules>
        </Binding>
      </TextBox.Text>
    </TextBox>
    <TextBlock HorizontalAlignment="Right">
      <Hyperlink NavigateUri="Page2.xaml">Guess</Hyperlink>
    </TextBlock>
  </StackPanel>
</Page>
