InterstitialAd class

InterstitialAd class

Represents a control that displays interstitial video or interstitial banner ads in an app. For walkthroughs and code examples that demonstrate how to use this control, see Interstitial ads and Advertising samples on GitHub.

Syntax


public ref class InterstitialAd sealed 

Members

The InterstitialAd class has these types of members:

Constructors

The InterstitialAd class has these constructors.

ConstructorDescription
InterstitialAd Initializes a new instance of the InterstitialAd class.

 

Events

The InterstitialAd class has these events.

EventDescription
AdReady Raised when the interstitial ad is ready to be shown.
Cancelled Raised when the user cancels the ad before it is considered complete.
Completed Raised when the ad is closed and the ad experience is considered complete.
ErrorOccurred Raised when the InterstitialAd encounters an operational error.

 

Methods

The InterstitialAd class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
AddAdTag Adds an ad tag to the InterstitialAd control.
Close Closes the interstitial ad that is showing.
RemoveAdTag Removes an ad tag from the InterstitialAd control.
RequestAd Requests an interstitial ad from the server.
Show Shows an interstitial ad.

 

Properties

The InterstitialAd class has these properties.

PropertyAccess typeDescription

CountryOrRegion

Read/write

Gets or sets the current country or region where the user is located.

Keywords

Read/write

Gets or sets the keywords to be used for targeting the ad.

PostalCode

Read/write

Gets or sets the postal code target for ads.

RequestTimeout

Read/write

Gets or sets the number of milliseconds to wait for an ad request to complete before timing out.

State

Read-only

Gets the current state of the interstitial ad.

 

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8.1

Namespace

Microsoft.Advertising.WinRT.UI
Microsoft::Advertising::WinRT::UI [C++]

Metadata

Microsoft.Advertising.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version]

See also

Object
Interstitial ads
Advertising samples on GitHub

 

 

Show:
© 2017 Microsoft