Window Control Focus Changes

- set the default focus control for all the windows.
This commit is contained in:
Brett Hewitson 2022-06-21 11:23:10 +10:00
parent 4199ab6160
commit 0b5d7c933a
41 changed files with 115 additions and 73 deletions

View file

@ -6,6 +6,7 @@
mc:Ignorable="d"
Width="300" Height="80" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" ResizeMode="NoResize" SizeToContent="Height"
Icon="../Art/favicon.ico" Title="{DynamicResource FindSettingWindow_Title}"
FocusManager.FocusedElement="{Binding ElementName=FindSettingTextbox}"
x:Name="FindSetting">
<Window.Resources>
<ResourceDictionary>
@ -29,7 +30,7 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="5,3,5,3" Text="{Binding FindSettingString, ElementName=FindSetting, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" SourceUpdated="FindSettingString_SourceUpdated" VerticalContentAlignment="Center" MaxLength="50" />
<TextBox x:Name="FindSettingTextbox" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="5,3,5,3" Text="{Binding FindSettingString, ElementName=FindSetting, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" SourceUpdated="FindSettingString_SourceUpdated" VerticalContentAlignment="Center" MaxLength="50" />
<Button Grid.Row="3" Grid.Column="2" Content="{DynamicResource FindSettingWindow_FindButtonLabel}" Margin="5" MinWidth="75" HorizontalAlignment="Right" Click="Find_Click"/>
</Grid>