Bagikan melalui


NativeAdsManager Class

Definition

Important

The NativeAdsManager class is deprecated. Use NativeAdsManagerV2 instead.

Provides methods and events you can use to request a native ad (that is, a NativeAd object). For a walkthrough that demonstrates how to use the NativeAdsManager class in your app, including code examples, see Native ads.

public ref class NativeAdsManager sealed
/// [Windows.Foundation.Metadata.Activatable(Microsoft.Advertising.WinRT.UI.__INativeAdsManagerFactory, 1)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class NativeAdsManager final
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.Advertising.WinRT.UI.__INativeAdsManagerFactory), 1)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Windows.Foundation.Metadata.WebHostHidden]
public sealed class NativeAdsManager
Public NotInheritable Class NativeAdsManager
Inheritance
Object Platform::Object IInspectable NativeAdsManager
Attributes

Additional features and requirements

Software Development Kit
Minimum supported OS
Windows 10 (10.0.10240.0)

Constructors

NativeAdsManager(String, String)

Creates a new instance of the NativeAdsManager class. For a walkthrough that demonstrates how to use this constructor, including information about how to obtain the application ID and ad unit ID values, see Native ads.

Methods

RequestAd()

Requests a NativeAd object for your app.

Events

AdReady

Raised when a NativeAd is ready for your app.

ErrorOccurred

Raised when a NativeAd encounters an operational error.

Applies to

See also