Suspend() [Windows 8]
Updated: June 4, 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 |
|---|---|
|
The call to Suspend was made before the first ad could be delivered. There is no ad to suspend. |
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:
-
This call (with no parameter) is used when you do not need to stop the expansion of an ad. Otherwise, use the overloaded method.
-
This call modifies the AdControl so that it renders the ad using a WebViewBrush rather than a WebView.
Report a bug in the product. Send email to psupport@microsoft.com. Send feedback about this documentation to adsfdbk@microsoft.com. Copyright © by Microsoft Corporation. All rights reserved.