InterstitialAd Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class InterstitialAd sealed
/// [Windows.Foundation.Metadata.Activatable(1)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class InterstitialAd final
[Windows.Foundation.Metadata.Activatable(1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class InterstitialAd
function InterstitialAd()
Public NotInheritable Class InterstitialAd
- Inheritance
- Attributes
Additional features and requirements
Software Development Kit | |
Minimum supported OS |
Windows 10 (10.0.10240.0)
|
Constructors
InterstitialAd() |
Initializes a new instance of the InterstitialAd class. |
Properties
CountryOrRegion |
Gets or sets the two-letter country or region code where the user is located. |
Keywords |
Gets or sets the keywords that target the audience for advertisements. |
PostalCode |
Gets or sets the postal code target for ads. |
RequestTimeout |
Gets or sets the number of milliseconds to wait for an ad request to complete before timing out. |
State |
Gets the current state of the interstitial ad. |
Methods
AddAdTag(String, String) |
Adds an ad tag to the InterstitialAd control. |
Close() |
Closes the interstitial ad that is showing. |
RemoveAdTag(String) |
Removes an ad tag from the InterstitialAd control. |
RequestAd(AdType, String, String) |
Requests an interstitial ad from the server. |
Show() |
Shows an interstitial ad. |
Events
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. |