Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Re: MouseEvent pass throughs?

 
 
Old 02-20-2006   #1 (permalink)
weddewu@gmail.com


 
 

Re: MouseEvent pass throughs?

You can try put the Canvas before the grid, like this:
<Grid>
<Canvas>
... some controls/content/etc manually positioned by coordinates
</Canvas>
<Grid>
... some controls/content/etc layed out by the grid
</Grid>
</Grid>

Maybe it will work well.


My System SpecsSystem Spec
Old 02-20-2006   #2 (permalink)
Jason Dolinger


 
 

Re: MouseEvent pass throughs?

weddewu@gmail.com wrote:
> You can try put the Canvas before the grid, like this:
> <Grid>
> <Canvas>
> ... some controls/content/etc manually positioned by coordinates
> </Canvas>
> <Grid>
> ... some controls/content/etc layed out by the grid
> </Grid>
> </Grid>
>
> Maybe it will work well.
>


Thanks, that's the first thing I that I tried before I posted. In my
actual scenario, the canvas comes after the grid. I use the canvas to
lay out some textboxes on top of the grid (which contains a ListBox).
These textboxes have their opacity set to about .7, so I can see the
ListBox contents underneath. If I place the Canvas before the Grid
essentially those Textboxes are behind the ListBox, which is not exactly
the visual effect I'm after. They must be in front.

Regards,
Jason
My System SpecsSystem Spec
Old 02-20-2006   #3 (permalink)
Nick Kramer [MSFT]


 
 

Re: MouseEvent pass throughs?

The I****TestVisible property can be set to false, which will make mouse
input pass through an element. But there's no way to send input to both the
element on top and the element underneath it (unless one is the parent of
the other).

--
-Nick Kramer [MSFT]
http://blogs.msdn.com/nickkramer

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Jason Dolinger" <jdolinger@lab49.com> wrote in message
news:43F9EE65.8040407@lab49.com...
> weddewu@gmail.com wrote:
>> You can try put the Canvas before the grid, like this:
>> <Grid>
>> <Canvas>
>> ... some controls/content/etc manually positioned by coordinates
>> </Canvas>
>> <Grid>
>> ... some controls/content/etc layed out by the grid
>> </Grid> </Grid> Maybe it will work well.
>>

>
> Thanks, that's the first thing I that I tried before I posted. In my
> actual scenario, the canvas comes after the grid. I use the canvas to lay
> out some textboxes on top of the grid (which contains a ListBox). These
> textboxes have their opacity set to about .7, so I can see the ListBox
> contents underneath. If I place the Canvas before the Grid essentially
> those Textboxes are behind the ListBox, which is not exactly the visual
> effect I'm after. They must be in front.
>
> Regards,
> Jason



My System SpecsSystem Spec
Old 02-20-2006   #4 (permalink)
Jason Dolinger


 
 

Re: MouseEvent pass throughs?

Nick Kramer [MSFT] wrote:
> The I****TestVisible property can be set to false, which will make mouse
> input pass through an element. But there's no way to send input to both the
> element on top and the element underneath it (unless one is the parent of
> the other).
>


Thanks Nick, that works well. Is there any possible way to catch the
event and then manually refire it, given that the UI object already
defines those events? That way you could capture it, perform some
action and then send it down to the underlying layer?
My System SpecsSystem Spec
Old 02-21-2006   #5 (permalink)
Chris Sammis


 
 

Re: MouseEvent pass throughs?

With the caveot that I haven't tried this, you could try calling the
underlying control's RaiseEvent(RoutedEventArgs) method from the method in
which you actually capture the event.

"Jason Dolinger" wrote:

> Thanks Nick, that works well. Is there any possible way to catch the
> event and then manually refire it, given that the UI object already
> defines those events? That way you could capture it, perform some
> action and then send it down to the underlying layer?
>

My System SpecsSystem Spec
Old 02-23-2006   #6 (permalink)
Nick Kramer [MSFT]


 
 

Re: MouseEvent pass throughs?

Not exactly. Input is more complicated than just an event, so forwarding
the events doesn't cover all the cases. You won't get the properties like
IsMouseOver, and you won't get the bracketing events like
MouseEnter/MouseLeave.

Also, as I recall you can't create your own instance of MouseEventArgs,
although that's mostly an accident of implementation that we never tried to
fix because we felt the above discussion would severely limit the usefulness
of creating your own MouseEventArgs.

-Nick Kramer [MSFT]
http://blogs.msdn.com/nickkramer

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Chris Sammis" <ChrisSammis@discussions.microsoft.com> wrote in message
newsEF709B7-7678-4BDD-B243-934F6AFE1C68@microsoft.com...
> With the caveot that I haven't tried this, you could try calling the
> underlying control's RaiseEvent(RoutedEventArgs) method from the method in
> which you actually capture the event.
>
> "Jason Dolinger" wrote:
>
>> Thanks Nick, that works well. Is there any possible way to catch the
>> event and then manually refire it, given that the UI object already
>> defines those events? That way you could capture it, perform some
>> action and then send it down to the underlying layer?
>>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
pass-through disk Virtual Server
By Pass UAC for some old programs Vista security
pass word Vista mail
how to pass UAC for a file?? Vista General
pass Parmater PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46