<commit_before><UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="ControlCatalog.Pages.TextBoxPage">
  <StackPanel Orientation="Vertical" Spacing="4">
    <Label Classes="h1">TextBox</Label>
    <Label Classes="h2">A control into which the user can input text</Label>

    <StackPanel Orientation="Horizontal"
              Margin="0,16,0,0"
              HorizontalAlignment="Center"
              Spacing="16">
      <StackPanel Orientation="Vertical" Spacing="8">
        <TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" />
        <TextBox Watermark="ReadOnly" IsReadOnly="True" Text="This is read only"/>
        <TextBox Width="200" Watermark="Watermark" />
        <TextBox Width="200"
                 Watermark="Floating Watermark"
                 UseFloatingWatermark="True"
                 Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>

        <TextBox Width="200"
                 Watermark="Password Box"
                 Classes="revealPasswordButton"
                 UseFloatingWatermark="True"
                 PasswordChar="*"
                 Text="Password" />
        <TextBox Width="200" Text="Left aligned text" TextAlignment="Left" />
        <TextBox Width="200" Text="Center aligned text" TextAlignment="Center" />
        <TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
        <TextBox Width="200" Text="Custom selection brush"
                  SelectionStart="5" SelectionEnd="22"
                  SelectionBrush="Green" SelectionForegroundBrush="Yellow"/>
        <TextBox Width="200" Text="Custom caret brush" CaretBrush="DarkOrange"/>
      </StackPanel>

      <StackPanel Orientation="Vertical" Spacing="8">
        <TextBox AcceptsReturn="True" TextWrapping="Wrap" Width="200" Height="125"
                 Text="Multiline TextBox with TextWrapping.&#xD;&#xD;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />
        <TextBox AcceptsReturn="True" Width="200" Height="125"
                 Text="Multiline TextBox with no TextWrapping.&#xD;&#xD;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />
<commit_msg>add an example of datavalidation errors on textbox.<commit_after><UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="ControlCatalog.Pages.TextBoxPage"
             xmlns:sys="clr-namespace:System;assembly=netstandard">
  <StackPanel Orientation="Vertical" Spacing="4">
    <Label Classes="h1">TextBox</Label>
    <Label Classes="h2">A control into which the user can input text</Label>

    <StackPanel Orientation="Horizontal"
              Margin="0,16,0,0"
              HorizontalAlignment="Center"
              Spacing="16">
      <StackPanel Orientation="Vertical" Spacing="8">
        <TextBox Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit." Width="200" />
        <TextBox Width="200" Watermark="ReadOnly" IsReadOnly="True" Text="This is read only"/>
        <TextBox Width="200" Watermark="Watermark" />
        <TextBox Width="200"
                 Watermark="Floating Watermark"
                 UseFloatingWatermark="True"
                 Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
        
        <TextBox Width="200" Text="Validation Error">
          <DataValidationErrors.Error>
            <sys:Exception /> 
          </DataValidationErrors.Error>
        </TextBox>

        <TextBox Width="200"
                 Watermark="Password Box"
                 Classes="revealPasswordButton"
                 UseFloatingWatermark="True"
                 PasswordChar="*"
                 Text="Password" />
        <TextBox Width="200" Text="Left aligned text" TextAlignment="Left" />
        <TextBox Width="200" Text="Center aligned text" TextAlignment="Center" />
        <TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
        <TextBox Width="200" Text="Custom selection brush"
                  SelectionStart="5" SelectionEnd="22"
                  SelectionBrush="Green" SelectionForegroundBrush="Yellow"/>
        <TextBox Width="200" Text="Custom caret brush" CaretBrush="DarkOrange"/>
      </StackPanel>

      <StackPanel Orientation="Vertical" Spacing="8">
        <TextBox AcceptsReturn="True" TextWrapping="Wrap" Width="200" Height="125"
                 Text="Multiline TextBox with TextWrapping.&#xD;&#xD;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />
        <TextBox AcceptsReturn="True" Width="200" Height="125"
                 Text="Multiline TextBox with no TextWrapping.&#xD;&#xD;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est." />

{'fraction_non_alphanumeric': 0.11005033848290227, 'fraction_numerical': 0.021176879014060058, 'mean_word_length': 2.9875432525951555, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7549177', 'n_tokens_mistral': 1787, 'n_tokens_neox': 1634, 'n_words': 447}