Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Keydown does not get fired up

$
0
0

hi.. group,

 

i am quite new in WPF stuff. I make up a project using Blend and put a keyDown event handler.

 

when I run the program, the OnKeyDown function is not called no matter what key you press. Is anyone has an idea how to catch a keydown event on a Grid.

 

Thanks.

 

 

 

<Window
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class="UntitledProject1.Window1"
 x:Name="Window"
 Title="Window1"
 Width="640" Height="480">

 <Grid x:Name="LayoutRoot" KeyDown="OnkeyDown"/>
</Window>


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>