Ad resizing in new Windows 10 SDK Release

We’ve just released an important update to our Windows 10 SDK (version Among other minor fixes and improvements It includes one important bug fix and one important new feature. Let’s cover the bug fix first.

Incorrect default ad size

Unfortunately some basic math error has slipped through unnoticed in earlier versions of the Windows 10 SDK and ads defaulted to the 320×50 effective pixel size, which is slightly incorrect aspect ration compared to the actual size of the images you upload (768×128). Sorry about that! We have now fixed the control to default to the correct size of 300×50.

Having said that, we made sure that we don’t break anything for those who had 320×50 hardcoded. In this scenario you will see some letterboxing around the ad, but the aspect ratio of the banners will be correct 6:1.


Resizable ads

While many of you enjoyed ads being quite small, some reported that this small size looks out of place in their designs on the desktop when the app window is relatively large. So, on a more positive note, we’ve added support for resizing of the ad control, as long as the correct aspect ratio of 6:1 is upheld and the size is at least 300×50 pixels. Like in an example you see below.


You can implement this type of resizing using adaptive triggers or other technique. The sample above sets the ad size to 480×80 and then flips the size to 300×50 when window gets narrow with code like this:

<VisualStateGroup x:Name="VisualStateGroup">
<VisualState x:Name="VisualStateNarrow">
<AdaptiveTrigger MinWindowWidth="{StaticResource NarrowMinWidth}" />
<Setter Target="AdDuplexControl.Width" Value="300" />
<Setter Target="AdDuplexControl.Height" Value="50" />
<VisualState x:Name="VisualStateNormal">
<AdaptiveTrigger MinWindowWidth="{StaticResource NormalMinWidth}" />

As usual you can upgrade to the newest version from the Visual Studio gallery.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s