Drag and Drop Using the Visual Studio 2012 Designer
Drag and drop the
AdControl into a Windows 8 XAML app using the Visual Studio 2012 Designer.
Before You Begin
Before you can use the SDK, you must have Windows 8, a version of Visual Studio 2012 Windows 8, and the SDK installed on your system. For more information, see Getting Started.
Integrate an AdControl into an App Using the Visual Studio 2012 Visual Designer
In Visual Studio, open the FILE menu and click New Project…. The New Project window is shown.
From the Templates section (on the left), expand Visual C# and click Windows style. Click Blank App (XAML). Name the project (for example, AdControlTest) and click OK.
In the Toolbox, you should see the AdControl in the Windows Advertising tab. Hint: If no controls are shown you may need to right click in the Toolbox and select Show All.
In the Solution Explorer window, double click MainPage.xaml. Visual Studio will load the Designer on the MainPage.xaml tab.
Drag and drop the AdControl into the Application Designer. Position the AdControl so that it is fully visible in the Application Designer.
If you want to explore the properties of the
AdControl, in the Application Designer click the AdControl, then in the Properties window expand the Advertising category.
Compile and run the app to see it with an ad, similar to the following:
Consult the TestMode topic for various
AdUnitId types to see a variety of ad sizes.
See the API Reference for additional targeting properties, methods for doing manual ad refreshes, and callback functions.
Other ResourcesGetting Started with Visual Studio
Report a bug in the product. Send email to firstname.lastname@example.org.
Send feedback about this documentation to email@example.com.