Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Gadgets
Windows Sidebar
System.Gadget
Events
 visibilityChanged Event

  Switch on low bandwidth view
visibilityChanged Event

Event fired when the gadget visibility changes due to the Windows Sidebar being hidden or displayed.

Syntax

Event propertySystem.Gadget.visibilityChanged = handler

Event Handler Parameters

handler Required. The name of the function to call when the event is fired.

Remarks

This event can be used to suspend or resume gadget execution as appropriate.

This event is fired only when the gadget is docked to the Sidebar.

This event updates the gadget visible property.

Example

The following example demonstrates how to use the visibilityChanged event to suspend or resume a timer based on the gadget visibility.

// Delegate for the gadget visibility changed event.
System.Gadget.visibilityChanged = checkVisibility;

// --------------------------------------------------------------------
// Handle the gadget visiblity changed event.
// event = Event argument.
// --------------------------------------------------------------------
function VisibilityChanged(event)
{
    if (!System.Gadget.visible)
    {
        // Stop the timer;
    }
    else
    {
        // Start the timer;
    }
}

Applies To

System.Gadget

See Also

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