Hi I want to type text in textbox by sendind keys from keyboard.
Xaml:
<Button Name="Start" Margin="20" Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" Click="Start_Click">Start</Button>
<TextBox Name="test" Grid.Column="0" Grid.Row="2"></TextBox>
C#:
private async void Start_Click(object sender, RoutedEventArgs e)
{
Keyboard.Focus(test);
await wait(1);
SendKeys.Send("s");
}
But this gives me an error. What I made wrong ?