<UserControl x:Class="PixiEditor.Views.UserControls.NumberInput"
             x:ClassModifier="internal"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
             mc:Ignorable="d"
             d:DesignHeight="20" d:DesignWidth="40" x:Name="numberInput" Focusable="True" FocusVisualStyle="{x:Null}">
    <TextBox TextAlignment="Center" Style="{StaticResource DarkTextBoxStyle}" Focusable="True"
             InputScope="Number" MouseWheel="TextBox_MouseWheel"
             PreviewTextInput="TextBox_PreviewTextInput" Text="{Binding ElementName=numberInput, Path=Value}" Padding="0" VerticalContentAlignment="Center">
        <i:Interaction.Behaviors>
            <behaviours:TextBoxFocusBehavior SelectOnMouseClick="True" ConfirmOnEnter="True"
                                             FocusNext="{Binding ElementName=numberInput, Path=FocusNext}"/>
            <behaviours:GlobalShortcutFocusBehavior/>
        </i:Interaction.Behaviors>
    </TextBox>
</UserControl>
