Created
February 27, 2012 23:25
-
-
Save dbeattie71/1927879 to your computer and use it in GitHub Desktop.
AdControlEx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using Microsoft.Advertising.Mobile.UI; | |
namespace Gmp.App.Framework.Controls | |
{ | |
public class AdControlEx : AdControl | |
{ | |
//MyApplicaitonId | |
public const string MyApplicationIdPropertyName = "MyApplicationId"; | |
public string MyApplicationId | |
{ | |
get { return (string) GetValue(MyApplicationIdProperty); } | |
set { SetValue(MyApplicationIdProperty, value); } | |
} | |
public static readonly DependencyProperty MyApplicationIdProperty = DependencyProperty.Register( | |
MyApplicationIdPropertyName, | |
typeof (string), | |
typeof (AdControl), | |
new PropertyMetadata("", OnMyApplicationIdPropertyChanged)); | |
private static void OnMyApplicationIdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | |
{ | |
((AdControl) d).ApplicationId = e.NewValue as string; | |
} | |
//MyAdUnitId | |
public const string MyAdUnitIdPropertyName = "MyAdUnitId"; | |
public string MyAdUnitId | |
{ | |
get { return (string) GetValue(MyAdUnitIdProperty); } | |
set { SetValue(MyAdUnitIdProperty, value); } | |
} | |
public static readonly DependencyProperty MyAdUnitIdProperty = DependencyProperty.Register( | |
MyAdUnitIdPropertyName, | |
typeof (string), | |
typeof (AdControl), | |
new PropertyMetadata("", OnMyAdUnitIdPropertyChanged)); | |
private static void OnMyAdUnitIdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) | |
{ | |
((AdControl) d).AdUnitId = e.NewValue as string; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment