Skip to content

Instantly share code, notes, and snippets.

jesevis

Block or report user

Report or block jesevis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Interop_HideBannerEvent.cs
 private void Interop_HideBannerEvent(object sender, EventArgs e)
{
Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
HideOrShow();
});
}
View HideOrShow.cs
private void HideOrShow()
{
if (AdduplexAdControl.Visibility == Visibility.Collapsed)
{
AdduplexAdControl.Visibility = Visibility.Visible;
}
else
{
AdduplexAdControl.Visibility = Visibility.Collapsed;
}
View AdDuplexAdControl.xaml
<SwapChainPanel x:Name="DXSwapChainPanel">
<ad:AdControl Name="AdDuplexAdControl" AdUnitId="YourAdUnitId" />
</SwapChainPanel>
View ButtonScript.cs
using UnityEngine;
using System.Collections;
public class ButtonScript : MonoBehaviour
{
public void HideBannerClicked()
{
Interop.HideBannerAd();
}
}
View Interop.cs
using UnityEngine;
using System.Collections;
using System;
public static class Interop
{
public static event EventHandler HideBannerEvent;
public static void HideBannerAd()
{
You can’t perform that action at this time.