Home
Dashboard
Directory
Help
Sign in
Microsoft
Connect
Your feedback improving Microsoft products
Search
Feedback
All Connect
Visual Studio and .NET Framework Home
Downloads
Feedback
Surveys
WPF LayoutUpdated has sender always null
by
Jan Kučera
Closed
as By Design
3
0
Sign in
to vote
Type:
Bug
ID:
293803
Opened:
8/17/2007 8:54:30 AM
Access Restriction:
Public
0
Workaround(s)
view
2
User(s) can reproduce this bug
Hi, I think the LayoutUpdated does not set the sender parameter.
Details
(
expand
)
Product Language
English
Version
Visual Studio Code Name "Orcas" (Beta 2)
Operating System
Windows Vista
Operating System Language
English
Steps to Reproduce
Create a new WPF application.
Attach a LayoutUpdated handler to the root Grid element.
Run the application and check the sender paramater in the handler.
Actual Results
null
Expected Results
Thre Grid control.
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
. [
Details
]
File Attachments
0 attachments
Comments (4)
Workarounds (0)
Sign in
to post a comment.
Please enter a comment.
Posted by
Microsoft
on 9/5/2008 at 3:43 PM
This is by design. The LayoutUpdated event is a per dispatcher event, meaning that it will fire whenever any element in the queue had a layout update. So an update on some element’s layout will cause other elements’ LayoutUpdated events to be also called. We think that LayoutUpdated may not be the event you want to use. Did you try SizeChanged event to do the job?
The SizeChanged event is an "instance event" that is raised whenever the size of the element you have attached the handler to has changed.
NOTE: If the position of the element on the screen changes, but not its size, this event does not get raised.
The LayoutUpdated event is a "static event" that is fired every time layout has been updated anywhere in the element tree, not just the element you have attached the handler to.
You might also want to look at this article on http://blogs.msdn.com/devdave/archive/2008/05/27/layout-events-sizechanged-and-layoutupdated.aspx. It’s related to Silverlight, but the explanation applies well to the WPF case.
Kindly clarify the feature you are trying to implement.
Posted by
apolak
on 10/8/2007 at 4:14 PM
This bug renders the LayoutUpdated event useless in most scenarios. Hope it's going to be fixed sometime soon.
Posted by
Microsoft
on 8/19/2007 at 10:42 PM
Thanks for your feedback. We have reproduced this bug on Visual Studio 2008 Beta 2, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.
Thank you,
Visual Studio Product Team.
Posted by
Microsoft
on 8/19/2007 at 5:15 PM
Thank you for your feedback. We are currently investigating. If this issue is urgent, please call support directly (see http://support.microsoft.com).
Thank you,
Visual Studio Product Team
Sign in
to post a workaround.
Please enter a workaround.
© 2012 Microsoft Corporation. All rights reserved.
Microsoft Connect Terms of Use
|
Trademarks
|
Privacy Statement
Microsoft