Open killer-frog opened 4 years ago
In my App, a user can take out a Pro subscription then choose to turn off adverts.
I have a banner add on my page:
<controls:MTAdView PersonalizedAds="true" x:Name="AdView" Visual="None" PropertyChanged="AdView_OnPropertyChanged" IsVisible="{Binding ShowAdverts}" />
When the IsVisiable property is bound to a property the height of the banner ad is set to one and never changes when an ad is loaded.
IsVisiable
As a work around I have had to add the following code:
private void AdView_OnPropertyChanged(object sender, PropertyChangedEventArgs e) { Debug.WriteLine($"Property Changed {e.PropertyName}"); if (e.PropertyName == nameof(IsVisible) && sender is MTAdView adview) { if (adview.IsVisible && adview.Height < 5) { adview.HeightRequest = 50; } } }
This happened when testing on iOS (both device and Simulator)
Using
In my App, a user can take out a Pro subscription then choose to turn off adverts.
I have a banner add on my page:
When the
IsVisiable
property is bound to a property the height of the banner ad is set to one and never changes when an ad is loaded.As a work around I have had to add the following code:
This happened when testing on iOS (both device and Simulator)
Using