Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PreviewKeyDown/KeyUp not tunnelling
Message
From
05/03/2010 12:42:04
John Baird
Coatesville, Pennsylvania, United States
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01452829
Message ID:
01452834
Views:
41
>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 .......
stupid question, but I think it bubbles by default. Have you set it to tunnel?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform