Permalink
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (53 sloc) 2.06 KB
<Window x:Class="SDKSamples.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:custom="clr-namespace:SDKSamples"
Title="Keyboard Sample"
Height="250"
Width="300"
>
<StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Border BorderBrush="Black" BorderThickness="1"
Width="100" Height="75" Margin="5">
<StackPanel>
<Label HorizontalAlignment="Center" Content="Number Of Hits" />
<Label Name="lblNumberOfTargetHits"
HorizontalAlignment="Center"
FontSize="14"
FontWeight="DemiBold"/>
</StackPanel>
</Border>
<!-- Sets the target key. -->
<Border BorderBrush="Black" BorderThickness="1"
Width="100" Height="75" Margin="5">
<StackPanel>
<Label HorizontalAlignment="Center" Content="Target Key" />
<TextBox Name="txtTargetKey"
MaxLength="1"
HorizontalAlignment="Center"
Width="20"
GotKeyboardFocus="TextBoxGotKeyboardFocus"
LostKeyboardFocus="TextBoxLostKeyboardFocus">A</TextBox>
</StackPanel>
</Border>
</StackPanel>
<!-- <SnippetKeyboardSampleXAMLHandlerHookup> -->
<Border BorderBrush="Black" BorderThickness="1"
Width="200" Height="100" Margin="5">
<StackPanel>
<Label HorizontalAlignment="Center" Content="Type Text In This TextBox" />
<TextBox Width="175"
Height="50"
Margin="5"
TextWrapping="Wrap"
HorizontalAlignment="Center"
VerticalScrollBarVisibility="Auto"
GotKeyboardFocus="TextBoxGotKeyboardFocus"
LostKeyboardFocus="TextBoxLostKeyboardFocus"
KeyDown="SourceTextKeyDown"/>
</StackPanel>
</Border>
<!-- </SnippetKeyboardSampleXAMLHandlerHookup> -->
</StackPanel>
</Window>