Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a property on <code>AdControl</code> named: <a href="http://msdn.microsoft.com/en-us/library/advertising-windows-sdk-api-reference-adcontrol-properties-usestaticanchor%28v=msads.10%29.aspx" rel="nofollow"><code>UseStaticAnchor</code></a></p> <p>Setting this property to true will fix both performance problems with scrolling, as well as the <code>AdControl</code> drawing on top of everything else.</p> <p><strong>Original answer - this method is now outdated:</strong></p> <p>The <code>AdControl</code> has two methods on it: <code>Suspend()</code> and <code>Resume()</code>. Whenever you open a popup window or AppBar, you will want to call <code>Suspend()</code>, and <code>Resume()</code> when it is closed again.</p> <p>I believe under the covers, the <code>AdControl</code> uses a <code>WebView</code> to display the ads. For whatever reason, a <code>WebView</code> will always display on top of everything else in your application. The fix for this is to temporarily disable the <code>WebView</code>, and instead display a <code>WebViewBrush</code>. (This technique is described here: <a href="http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.webviewbrush" rel="nofollow">http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.webviewbrush</a>) So when you call Suspend() and Resume(), the AdControl is doing this under the covers.</p> <p>What I've ended up doing is creating a UserControl (named <code>SuspendingAdControl</code>) that simply contains an AdControl and can be used anywhere in the app. Then whenever a window is opened or closed, I use Caliburn Micro's EventAggregator to publish an event. The SuspendingAdControl will subscribe and handle these events, and then appropriately call <code>AdControl.Suspend()</code> or <code>Resume()</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload