![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | FrameworkElement overlay notification? Hi all, Is there a way to receive an event notification when some other element in a visual tree overlays the current element? For example, I have a grid with a TextBlock in it. At runtime another textblock gets inserted into the visual tree directly overlaying the existing box (or at least a portion of it). Is there some event that we can hook into when part of the tree is covered up? I'm trying to figure this out for translucency type issues. I want to adjust the Opacity value of this box when it is covered up. Even better, is there some way to indicate that when a particular visual element is in the tree, to change the opacity of the entire area underneath that element? This will go quite a way towards helping to develop some nice translucent effects. Thanks all, Jason |
| | #2 (permalink) |
| Guest | Re: FrameworkElement overlay notification? Not really information WPF tries to provide -- it's extremely expensive to calculate for every possible element. For your specific scenario, I can think of a couple approaches -- * After every change in layout, call InputHitTest with accordance of your control and see if you get the same control * or better, hook whatever logic put the control there in the first place. E.g., override some method on Grid. -- -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:euLXd1pJGHA.424@TK2MSFTNGP12.phx.gbl... > Hi all, > > Is there a way to receive an event notification when some other element in > a visual tree overlays the current element? For example, I have a grid > with a TextBlock in it. At runtime another textblock gets inserted into > the visual tree directly overlaying the existing box (or at least a > portion of it). Is there some event that we can hook into when part of > the tree is covered up? > > I'm trying to figure this out for translucency type issues. I want to > adjust the Opacity value of this box when it is covered up. Even better, > is there some way to indicate that when a particular visual element is in > the tree, to change the opacity of the entire area underneath that > element? This will go quite a way towards helping to develop some nice > translucent effects. > > Thanks all, > Jason |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Animating parts of a custom FrameworkElement (OnRender and DoubleAnimation question) | Illumineo | Avalon | 2 | 06-26-2006 02:22 PM |
| API Standards question: FrameworkElement.Focusable | Keith Patrick | Avalon | 3 | 02-27-2006 02:11 AM |
| How to get the coordinates of a FrameworkElement? | Jason Dolinger | Avalon | 2 | 01-31-2006 07:00 AM |
| Does FrameworkElement.RemoveLogicalChild(object child) work? | Jason Dolinger | Avalon | 3 | 01-31-2006 06:59 AM |
| Re: Implementing z-order control of FrameworkElement children | Nancy Phan [MS] | Avalon | 1 | 01-10-2006 03:52 PM |