Represents a control that displays banner ads in an app.
public : sealed class AdControl : StackPanel, IClosable
struct winrt::Microsoft::Advertising::WinRT::UI::AdControl : StackPanel, IClosable
public sealed class AdControl : StackPanel, IDisposable
Public NotInheritable Class AdControl Inherits StackPanel Implements IDisposable
|Minimum supported OS|
Windows 10 (10.0.10240.0 or later)
|AdControl() AdControl() AdControl() AdControl()||
Initializes a new instance of the AdControl class.
|AdUnitId AdUnitId AdUnitId AdUnitId||
Gets or sets the ad unit identifier for this AdControl object. This value is available in Windows Dev Center.
|ApplicationId ApplicationId ApplicationId ApplicationId||
Gets or sets the application ID for this AdControl object. This value is available in Windows Dev Center.
|AutoRefreshIntervalInSeconds AutoRefreshIntervalInSeconds AutoRefreshIntervalInSeconds AutoRefreshIntervalInSeconds||
Gets or sets the interval at which the AdControl refreshes the currently displayed banner ad, in seconds.
|CountryOrRegion CountryOrRegion CountryOrRegion CountryOrRegion||
Gets or sets the two-letter country or region code where the user is located.
|HasAd HasAd HasAd HasAd||
Gets a value that indicates whether or not the AdControl is currently serving a banner ad.
|IsAutoRefreshEnabled IsAutoRefreshEnabled IsAutoRefreshEnabled IsAutoRefreshEnabled||
Gets or sets a value that indicates whether automatic rotation of banner ads is enabled.
|IsEngaged IsEngaged IsEngaged IsEngaged||
Gets a value that indicates whether the user is interacting with the banner ad.
|IsSuspended IsSuspended IsSuspended IsSuspended||
Gets a value that indicates whether the AdControl is in a suspended state.
|Keywords Keywords Keywords Keywords||
Gets or sets the keywords that target the audience for advertisements.
|PostalCode PostalCode PostalCode PostalCode||
Gets or sets the postal code to target for the banner ad.
|AddAdTag(String, String) AddAdTag(String, String) AddAdTag(String, String) AddAdTag(String, String)||
Adds an ad tag to the AdControl.
|Close() Close() Close() Close()||
Frees associated system resources used by the control.
|Dispose() Dispose() Dispose() Dispose()||
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|Refresh() Refresh() Refresh() Refresh()||
Directs the AdControl to show the next ad when a new one becomes available, if auto-refresh is disabled. The currently rendered ad remains until the next ad becomes available.
|RemoveAdTag(String) RemoveAdTag(String) RemoveAdTag(String) RemoveAdTag(String)||
Removes an ad tag from the AdControl.
|Resume() Resume() Resume() Resume()||
Resumes the normal display of a banner ad after a call to Suspend.
|Suspend() Suspend() Suspend() Suspend()||
Suspends the current banner ad and replaces the current view of the banner ad with a static snapshot of what was being rendered.
|AdRefreshed AdRefreshed AdRefreshed AdRefreshed||
Raised when the AdControl receives a new banner ad.
|ErrorOccurred ErrorOccurred ErrorOccurred ErrorOccurred||
Raised when the AdControl encounters an operational error.
|IsEngagedChanged IsEngagedChanged IsEngagedChanged IsEngagedChanged||
Raised when the user clicks the banner ad and is interacting with it rather than the app.
|OnManipulationStateChanged OnManipulationStateChanged OnManipulationStateChanged OnManipulationStateChanged||
Raised when the AdControl receives a manipulation state changed event from the banner ad.
|OnMouseWheel OnMouseWheel OnMouseWheel OnMouseWheel||
Raised when the AdControl receives a mouse wheel event.
|OnPointerDown OnPointerDown OnPointerDown OnPointerDown||
Raised when the user clicks, points, or touches the banner ad.
|OnPointerMove OnPointerMove OnPointerMove OnPointerMove||
Raised when the pointing device is moved.
|OnPointerUp OnPointerUp OnPointerUp OnPointerUp||
Raised when the user has stopped clicking, pointing, or touching a banner ad.