(ConvertMedia): pressing 'Enter' in the text box concludes dialog.

This commit is contained in:
morkt 2017-01-18 04:51:41 +04:00
parent 4edd06e7d9
commit 7b1f237448
2 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@
<ColumnDefinition Width="350"/> <ColumnDefinition Width="350"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="20,0,0,0" VerticalAlignment="Bottom" Grid.Row="0" Grid.Column="0" Height="23"/> <local:ExtAutoCompleteBox x:Name="DestinationDir" Margin="20,0,0,0" VerticalAlignment="Bottom" Grid.Row="0" Grid.Column="0" Height="23" EnterKeyDown="acb_OnEnterKeyDown"/>
<Button Margin="10,0,20,0" VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1" <Button Margin="10,0,20,0" VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1"
Command="{x:Static local:Commands.Browse}" Height="22" Width="22"> Command="{x:Static local:Commands.Browse}" Height="22" Width="22">
<Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/> <Image Source="{StaticResource IconSearch}" Stretch="Uniform" UseLayoutRounding="True" SnapsToDevicePixels="True" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>

View File

@ -48,5 +48,10 @@ namespace GARbro.GUI
{ {
this.DialogResult = true; this.DialogResult = true;
} }
private void acb_OnEnterKeyDown (object sender, KeyEventArgs e)
{
this.DialogResult = true;
}
} }
} }