Updated: March 31, 2014
Published: April 2, 2014
Provides the information needed to show advertising in your application.
Assembly: Microsoft.Advertising.Mobile.UI (in Microsoft.Advertising.Mobile.UI.dll)
When the AdControl is created, the rotationEnabled parameter is set to true. The AdControl will then show a new ad every 30 to 60 seconds.
If this behavior does not suit the application, you can instantiate the AdControl with automatic ad rotation deactivated. To do this, call the overloaded constructor with the IsAutoRefreshEnabled parameter set to false. You can then use the Refresh method to show the next ad.
Use one or more unique instances of an AdControl on a page. Do not use the same instance of an AdControl across multiple pages.
Once set, the parent of an AdControl should not be changed.
All required properties of the AdControl need to be set when it is instantiated.
If the code can show a test ad in the emulator but no new ad is shown on a device, an error may have occurred in transmission or no new ad may be available. Use the ErrorOccurred event to help determine the cause.
The following markup uses the Silverlight framework and is an example of instantiating a new AdControl. Note: You must set the AdUnitId property before you can show an ad.
The following markup uses the XAML framework and is an example of instantiating a new AdControl. Note: You must set the AdUnitId property before you can show an ad.
Object :: DependencyObject :: UIElement :: FrameworkElement :: Control :: UserControl :: Microsoft.Advertising.Mobile.UI.AdControl
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 firstname.lastname@example.org. There is no product support through this alias. Documentation feedback only.