Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PreviewKeyDown/KeyUp not tunnelling
Message
From
05/03/2010 12:29:14
 
 
To
All
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
PreviewKeyDown/KeyUp not tunnelling
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01452829
Message ID:
01452829
Views:
217
Hi,
Very simple WPF window:
<Window x:Class="TabTest.Window3"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
    <Canvas x:Name="Outer" Width="500" Height="500" Background="Beige">
        <ScrollViewer x:Name="SV" Width="500" Height="500" >
            <Canvas x:Name="Inner" Width="1000" Height="1000" Background="Red" ></Canvas>
        </ScrollViewer>
    </Canvas>
</Window>
No Key events (i.e. PreviewKeyDown,KeyDown,PreviewKeyUp,KeyUp) fire on the 'Inner' Canvas.
The ScrollViewer behaves as I would expect by eating the KeyDown for 'action' keys such as the arrow keys - but I thought the other events would drill down to the inner canvas.

What am I missing .......
Next
Reply
Map
View

Click here to load this message in the networking platform