无法创建Adcontrol

时间:2012-11-05 17:01:23

标签: vb.net visual-studio-2010 windows-phone-7

我希望我的代码能够制作新的广告控件

Private Sub PhoneApplicationPage_Loaded (sender As System.Object, e As System.Windows.RoutedEventArgs)
    If App.IsTrial Then
        Dim _adControl As New AdControl()

        ' Use your real Application ID and Ad Unit ID here
        _adControl.ApplicationId = "test_client"
        _adControl.AdUnitId = "Image480_80"

        _adControl.Width = 480
        _adControl.Height = 80

        spAd.Children.Add(_adControl)
    End If
End sub

page.xaml

<StackPanel x:Name="spAd" Grid.Row="0">

</StackPanel>   

怎么了?我放入堆叠面板的所有东西都是可见的。看起来代码没有执行它应该执行的操作。

0 个答案:

没有答案