NativeAd class

NativeAd class

Represents a native ad, which is an ad format where all the components of the ad (including the title, image, description, and call to action text) are delivered to your app as separate elements. Use the properties of the NativeAd to get each element of the native ad. You can integrate these elements into your app using your own choice of fonts, colors, and animations to build an ad experience that fits the look and feel of your app. For a walkthrough that demonstrates how to use the NativeAd class in your app, including code examples, see Native ads.

Syntax


public ref class NativeAd sealed : IClosable

Members

The NativeAd class has these types of members:

Methods

The NativeAd class has these methods. It also inherits methods from the Object class.

MethodDescription
Dispose Disposes the native ad and frees resources used by the control.
RegisterAdContainer(FrameworkElement) Registers the specified UI element in your app that acts as a container for the native ad elements. When you use this method, the entire container is a clickable element for the ad. You must register the container to properly track ad impressions and clicks.
RegisterAdContainer(FrameworkElement,IVector(FrameworkElement)) Registers the UI element in your app that acts as a container for the native ad elements and any specific UI elements that can be clicked by the user. You must register these components to properly track ad impressions and clicks.

 

Properties

The NativeAd class has these properties.

PropertyAccess typeDescription

AdditionalAssets

Read-only

Gets a dictionary of key/value pairs that contain data for additional optional asset types (if present) for the native ad that do not have corresponding properties in the NativeAd class.

AdIcon

Read-only

Gets the ad icon supplied by Microsoft. This icon is intended to be shown in your native ad experience to help differentiate the ad from the rest of your app.

CallToAction

Read-only

Gets the call to action text for the native ad.

Description

Read-only

Gets the description for the native ad.

IconImage

Read-only

Gets the icon image for the native ad, as supplied by the ad sponsor.

MainImages

Read-only

Gets the main images for the native ad, as supplied by the ad sponsor.

Price

Read-only

Gets the price of the product that is being advertised in the native ad, including a currency symbol.

Rating

Read-only

Gets the rating of the product that is being advertised in the native ad.

SponsoredBy

Read-only

Gets the brand name of the sponsor for the product that is being advertised in the native ad.

Title

Read-only

Gets the title for the native ad.

 

Requirements

Minimum supported client

Windows 10 [Windows Store apps only]

Minimum supported server

None supported

Minimum supported phone

Windows 10 Mobile

Namespace

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

Metadata

Microsoft.Advertising.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(STA)]
[Version]
[WebHostHidden()]

See also

Object
IClosable
Native ads
OpenRTB Native Ads API Specification

 

 

Show:
© 2017 Microsoft