CreateAd Method (String, Rectangle) (XNA)

CreateAd Method (String, Rectangle)

Updated: August 2, 2013

Published: April 2, 2014

Creates a new instance of the DrawableAd object that has automatic ad refresh enabled.

Namespace: Microsoft.Advertising.Mobile.Xna

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

public DrawableAd CreateAd(
 string adUnitId,
 Rectangle displayRect,
)

This constructor sets the AutoRefreshEnabled property of the DrawableAd object to true.

Name

Description

Type

adUnitId

Specifies the unique identifier for the AdUnitId.

string

displayRect

Specifies the rectangle that will contain the ad to be rendered.

Rectangle

Return Value

A new instance of the DrawableAd class.

Exceptions

Exception Type

Condition

InvalidOperationException

The ApplicationId property of this AdGameComponent object 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:
© 2016 Microsoft