OnResized Event

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Occurs whenever the ActualHeight or ActualWidth property of the WPF/E control change.

HTML
You cannot use this property in HTML.
Scripting

wpfeObject.onResized = eventhandlerFunction

Event Handler Parameters

sender Object

Identifies the object that invoked the event.

Event Information

The OnResized event occurs whenever the WPF/E control changes its ActualHeight or ActualWidth property when in embedded mode. When the WPF/E control is in full-screen mode, the OnResized event does not occur:

  • embedded mode --control displays within the Web browser.
  • full-screen mode--control displays on top of all other applications.

Remarks

If a change in size of the WPF/E control triggers the FullScreenChanged event, the OnResized event does not occur. In addition, the OnResized event does not occur when the WPF/E control is in full-screen mode.

The following JavaScript example shows how to define a OnResized event for a WPF/E control.

JavaScript
var control;
function onLoaded(sender, args)
{
    // Retrieve a reference to the WPF/E control.
    control = sender.getHost();
    // Set the event handler function to the OnResized event.
    control.onResized = "javascript:onResized";
    // Do initial layout of the app based on initial size.
    updateLayout(control.actualWidth, control.actualHeight);
}
function onResized(sender, eventArgs)
{
    // Do layout resizing of the app whenever the FullScreen property changes.
    updateLayout(control.actualWidth, control.actualHeight);
}
// Resize and reposition application elements.
function updateLayout(width, height)
{
    // Perform layout tasks based on width and height.
}

Note  WPF/E does not support automatic layout of control elements. This means that applications have to provide logic to resize themselves appropriately when the control's size changes.

Applies To

WPF/E Control

See Also

ActualHeight, ActualWidth, FullScreenChanged, Resizing a WPF/E Control, WPF/E Full-screen Support