Technology Questions

Go Back   Technology Questions > Hardware Questions > Mobile Computers > Tablet PC > Tablet PC - Sandbox (Chit Chat) > Tablet PC Bloggers

Tablet PC Bloggers Read Loren, Lora, and Layne's Blogs about Tablet PCs, UMPCs, and more.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 05-08-2007, 10:41 PM
Administrator
 
Join Date: May 2004
Posts: 1,140
Loren is on a distinguished road
Post Resizing a Silverlight control speed bump

I'm trying to resize a Silverlight control on the fly. I'm using the code from this MSDN page.
Unfortunately in IE 7 I'm getting a size of zero for the Silverlight control's actualwidth/actualHeight dimensions in the loaded event. This only happens in IE 7. In Firefox, I'm getting the correct size. Hmmm.
MSDN suggests the following code to set the original size to:
// Retrieve a reference to the control.
var control = sender.getHost();
// Do initial layout of the app based on initial size.
updateLayout(control.content.actualWidth, control.content.actualHeight);
Unfortunately, this gives a size of zero in IE in the loaded event.
To get around this I use:
var silverlightObj = document.getElementById("silverlightObj");
updateLayout(silverlightObj.clientWidth, silverlightObj.clientHeight);
Seems to work in IE and Firefox. I need to test in Safari.


Incremental Blogger
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 05-08-2007, 10:41 PM
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Again: MS Mouse Pointer Speed Control - but WIN XP Prof. Udo Windows Vista 1 07-20-2008 09:10 AM
MS Mouse Pointer Speed Control Ted B. Windows Vista 12 06-01-2008 12:40 PM
Tiny microphone (a bump on the side of my laptop) nunamus Notebooks 0 05-23-2007 12:11 AM
Resizing a Silverlight control speed bump Loren Tablet PC Bloggers 0 05-08-2007 09:40 PM
Can I download an Intel Utility to control the Centrino's speed? Juan I. Cahis Windows XP Tablet PC Newsgroup 8 01-09-2005 11:15 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 12:18 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0