示例#1
0
        public void ConfigureAds()
        {
            /*
             * Windows Desktop     Windows Phone & Windows Mobile
             * 250×250*            300×50
             * 300×250             320×50
             * 728×90              480×80
             * 160×600             640×100
             * 300×600
             */

            var mediatorBar = new AdMediatorControl
            {
                Id     = "AdMediator-Id-13B224DA-AEC5-41E6-9B0A-FE01E4E1EB2B",
                Name   = "AdMediator_3CB848",
                Width  = 728,
                Height = 90
            };
            var row = 2;

            if (DeviceHelper.IsType(DeviceFamily.Mobile))
            {
                row = 3;
                mediatorBar.Width  = 320;
                mediatorBar.Height = 50;
            }

            Grid.SetRow(mediatorBar, row);
            RootLayout.Children.Add(mediatorBar);
            AdsLoaded = true;
        }
示例#2
0
        public void ConfigureAds()
        {
            /*
               Windows Desktop     Windows Phone & Windows Mobile
               250×250*            300×50
               300×250             320×50
               728×90              480×80
               160×600             640×100
               300×600	
               */

            var mediatorBar = new AdMediatorControl
            {
                Id = "AdMediator-Id-13B224DA-AEC5-41E6-9B0A-FE01E4E1EB2B",
                Name = "AdMediator_3CB848",
                Width = 728,
                Height = 90
            };
            var row = 2;
            if (DeviceHelper.IsType(DeviceFamily.Mobile))
            {
                row = 3;
                mediatorBar.Width = 320;
                mediatorBar.Height = 50;
            }

            Grid.SetRow(mediatorBar, row);
            RootLayout.Children.Add(mediatorBar);
            AdsLoaded = true;
        }