Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Suspend() (JavaScript: suspend) - Windows 8.0

Microsoft Advertising Services

Updated: August 2, 2013

Published: June 4, 2013

Suspends the current ad. Replaces the current view of the ad with a static snapshot of what was being rendered.

Namespace: Microsoft.Advertising.WinRT.UI (in Microsoft.Advertising.WinRT.UI.winmd)

JavaScript Library: ad.js

Syntax

C#

public void Suspend(bool)

JavaScript

function suspend();

Exceptions

Exception

Condition

System.NullReferenceException

The call to Suspend was made before the first ad could be delivered. There is no ad to suspend.

System_CLiX_warning Warning

Do not call Suspend before the first AdRefreshed event.

After calling Suspend the AdControl will not automatically refresh, even if the IsAutoRefreshEnabled property is set to true. Suspend overrides the setting of the IsAutoRefreshEnabled property while the ad is in a suspended state. Once Resume has been called, the value of the IsAutoRefreshEnabled property controls the refresh behavior of the AdControl.

After a call to Suspend, you cannot manually refresh the AdControl until Resume has been called.

For XAML:

  1. This call (with no parameter) is used when you do not need to stop the expansion of an ad. Otherwise, use the overloaded method.

  2. This call modifies the AdControl so that it renders the ad using a WebViewBrush rather than a WebView.

Support and Feedback

Get product support or report a bug in the advertising SDK by visiting the Windows 8 Dev Center support page (scroll down to the section "Microsoft Advertising support").

Send feedback about this documentation to adsfdbk@microsoft.com. There is no product support through this alias. Documentation feedback only.

Community Additions

ADD
Show:
© 2015 Microsoft