Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Silverlight
General Reference
 OnResize
Collapse All/Expand All Collapse All
Silverlight
OnResize (Silverlight Plug-in Object)

Specifies a handler for the Resized event that occurs when the Silverlight plug-in's object tag is resized and the ActualHeight or the ActualWidth of the Silverlight plug-in change.

object Element

<object ...>
  <param name="onresize" value="functionname"/>
  ...
</object>

Silverlight.js

Not available.

JavaScript

silverlightObject.Content.OnResize = handlername;

COM

Not available.

Managed Code

The Resized event occurs when the Silverlight plug-in is in embedded mode and the value of the ActualHeight or ActualWidth properties changes.

If a change in size of the Silverlight plug-in triggers the FullScreenChanged event, the Resized event does not occur. The Resized event also does not occur when the Silverlight plug-in is in full-screen mode.

In embedded mode, the plug-in displays in the Web browser window. In full-screen mode, the plug-in displays on top of all other applications.

NoteNote:

Silverlight does not support automatic layout of elements based on changes to the plug-in size. Applications must provide resize logic for when the plug-in size changes.

Handle the Resized event instead of the DOM Loaded event when you want to respond to changes to the plug-in size (as opposed to changes to the size of other elements in the HTML DOM). The values of the ActualHeight and ActualWidth properties of the Silverlight plug-in are not guaranteed to be set at the time that the Loaded event occurs. However, Resized occurs when the values of the ActualHeight or ActualWidth properties change, which includes when the plug-in first loads.

Arguments for a Resized Event Handler Function

sender

object

The Silverlight plug-in that raised the event.

args

Always null.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker