Skip to content

Instantly share code, notes, and snippets.

Avatar

Windows App Tutorials wtuts

View GitHub Profile
@wtuts
wtuts / analytics.cs
Created Jun 19, 2014
Google analytics for Windows phone app
View analytics.cs
// Constructor
public MainPage()
{
InitializeComponent();
//For page view add the following line in each page constructor
GoogleAnalytics.EasyTracker.GetTracker().SendView("MainPage");
}
//For button click event handlers add the following code
private void Button_Click_1(object sender, RoutedEventArgs e)
@wtuts
wtuts / admob.cs
Last active Aug 29, 2015
admob in windows phone app
View admob.cs
//This is a function for creating a admob add dynamically using c#
void admob(StackPanel stck)
{
//Create a admob banner
AdView bannerAd = new AdView
{
Format = AdFormats.Banner,
AdUnitID = "YOUR_AD_UNIT_ID"
};
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
View in_app_purchase.cs
public ObservableCollection<ProductItem> picItems = new ObservableCollection<ProductItem>();
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
RenderStoreItems();
base.OnNavigatedTo(e);
}
private async void RenderStoreItems()
{
@wtuts
wtuts / adview.xaml
Created Jun 22, 2014
block ads using xaml
View adview.xaml
<GoogleAds:AdView Visibility="{Binding DISPLAYADS, Converter={StaticResource BoolToVisibilityConverter}, Source={StaticResource ApplicationSettings}}" AdUnitID="ca-app-pub-0623406534268990/5403604500" HorizontalAlignment="Left" Margin="-10,0,-14,0" Height="80" Width="480" VerticalAlignment="Top"/>
@wtuts
wtuts / mainpage.xaml.cs
Created Jun 22, 2014
block ads using c#
View mainpage.xaml.cs
if(AppSettings.DISPLAYADS)
admob(AdGrid);
You can’t perform that action at this time.