Export (0) Print
Expand All

CreateAd Method (String, Rectangle, AutoRefreshEnabled)

Updated: August 2, 2013

Published: April 2, 2014

Creates a new DrawableAd object.

Namespace: Microsoft.Advertising.Mobile.Xna

Assembly: Microsoft.Advertising.Mobile.Xna (in Microsoft.Advertising.Mobile.Xna)

public Ad CreateAd(
 string unitId,
 Rectangle displayRect,
 RotationMode rotationMode,
)

Name

Description

Type

unitId

Specifies the unique ad unit identifier (AdUnitId) for the ad.

String

displayRect

Specifies the rectangle that contains the ad that will be rendered.

Rectangle

autoRefreshEnabled

When this property is set to true, the DrawableAd object this method creates will download and show new ads automatically, if any are available.

AutoRefreshEnabled

Return Value

A new instance of the DrawableAd class.

Exceptions

Exception Type

Condition

InvalidOperationException

The ApplicationId property of this AdGameComponent is null or Empty.

Platforms

Windows Phone 7.x only

Support and Feedback

Get product support or report a bug in the product by visiting the Windows Phone Dev Center support page (scroll down to the section "Microsoft Advertising support").

Send feedback about this documentation to adsfdbk@microsoft.com. There is no product support through this alias. Documentation feedback only.

Community Additions

ADD
Show:
© 2015 Microsoft