<UserControl x:Class="HavenSoft.HexManiac.WPF.Controls.PythonPanel"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:HavenSoft.HexManiac.WPF.Controls"
      xmlns:hmar="clr-namespace:HavenSoft.HexManiac.WPF.Resources"
      Background="{DynamicResource Background}">
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="*"/>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
      <Button Command="{hmar:MethodCommand Close}" Width="20" Height="20" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-20,0,0">
         <Path Data="{hmar:Icon Exit}" Fill="{DynamicResource Secondary}" Stretch="Uniform"/>
      </Button>
      <local:TextEditor x:Name="InputBox" Grid.Row="0" Margin="5" DataContext="{Binding PythonEditor}"
               PreviewKeyDown="PythonTextKeyDown" PreviewMouseWheel="ChangeInputTextSize" />
      <local:AngleButton HorizontalAlignment="Right" Margin="10,0" Grid.Row="1" Content="Run" Direction="Out" Height="24" Command="{hmar:MethodCommand RunPython}"/>
      <TextBox Grid.Row="2" Margin="5" Text="{Binding ResultText}" FontFamily="Consolas" VerticalScrollBarVisibility="Visible"
               IsReadOnly="True" TextWrapping="Wrap" BorderThickness="0" Background="{DynamicResource Background}" />
   </Grid>
</UserControl>
