How to create Microsoft-Advertisement-on-App in C#

How to create  Microsoft-Advertisement-on-App with Xaml
Purpose:

  1. You can add Microsoft advertisement on your app if you are sending it to app store and you will want your user to make use of the app free while advert its runing on it.
  2. But user that upgrade by paying some little cents will have the app runing without advert.

Get access to Microsoft Advertisement Code on Github

Codes and screenshort below:



Code for MainPage.xaml
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MicrosoftAdvertsementOnApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Universal="using:Microsoft.AdMediator.Universal"
x:Class="MicrosoftAdvertsementOnApp.MainPage"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Universal:AdMediatorControl x:Name="
AdMediator_3E8C7E" HorizontalAlignment=
"Left" Height="250" Id="AdMediator-Id-0585DBBD-0695-4116-86CF-8AEA59BD21F1" VerticalAlignment="Top" Width="300"/>
</Grid>
</Page>

Code within MainPage.xaml.cs
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template // is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace MicrosoftAdvertsementOnApp
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
}
}
Screenshort of Microsoft Advertisement runing on App:

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

New Post

New style string formatting in Python

In this section, you will learn the usage of the new style formatting. Learn more here . Python 3 introduced a new way to do string formatti...