Export (0) Print
Expand All

Drag and Drop Using the Visual Studio 2013 Designer - Windows 8.1

Microsoft Advertising Services

Updated: April 30, 2014

Published: April 30, 2014

Drag and drop the AdControl into a Windows 8.1 XAML app using the Visual Studio 2013 Designer.

Before You Begin

  • Before you can use the SDK, you must have Windows 8.1, a version of Visual Studio 2013, and the Ad SDK for Windows 8.1 installed on your system. For more information, see Getting Started.

Integrate an AdControl into an App Using the Visual Studio 2013 Visual Designer

  1. In Visual Studio, open the FILE menu and click Project…. The New Project window is shown.


  2. From the Templates section (on the left), expand Visual C#, click Store Apps, and click Windows Apps. Click Blank App (Windows). Accept the default name for the project and click OK.

  3. 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.

    VS Designer Main Page


  4. In the Solution Explorer window, double click MainPage.xaml. Visual Studio will load the Designer on the MainPage.xaml tab.


  5. Drag and drop the AdControl into the Application Designer. Position the AdControl so that it is fully visible in the Application Designer.

    Drag and Drop the AdControl


  6. 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.

  7. Compile and run the app to see it with an ad, similar to the following:

    Ad in Tablet Emulator


To see how different ad types render in the sample app, change the AdUnitId property to any of the values listed in the TestMode topic. Change the Height and Width properties of the AdControl to match the ad size you choose. The AdControl must be the same size as the ad unit or larger.

Support and Feedback

Get product support or report a bug in the advertising SDK by visiting the Windows Store Apps developer support page support page. For product support, under "App development" click the "Advertising SDK" link. To post a question in the support forum, scroll down to "Find answers online" and click "Ads-in-Apps for Windows 8 forum".

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

Community Additions

ADD
Show:
© 2014 Microsoft