diff --git a/MainWindow.xaml b/MainWindow.xaml index b407a55..cc13211 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -5,13 +5,14 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:BD_empresa" mc:Ignorable="d" + Loaded="Window_Loaded" Title="Pesquisar Unidades" Height="650" Width="800"> - + @@ -38,6 +39,7 @@ Command="{Binding RefreshCommand}" VerticalAlignment="Center" /> - + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index d5363e7..ff15670 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -24,6 +24,10 @@ namespace BD_empresa var accessService = new Data.AccessService($"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={accessDbPath};Jet OLEDB:Database Password=gds21"); DataContext = new ViewModels.MainWindowViewModel(accessService); } + private void Window_Loaded(object sender, RoutedEventArgs e) + { + txtEmpresaSearch.Focus(); + } private void UnidadeListView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) {