IsEnabled field doesn't work.

Jul 13, 2015 at 4:28 PM
Hey guys. Just trying to use AdRotator in my project, version 2.1.1. And it looks like IsEnabled field doesn't work at all. What I try to achieve is control AdRotator Control by setting IsEnabled value to true when I want to show ads and to false when don't. It doesn't change functionality of Control at all.

I could achieve hiding and showing plugin by setting Visibility to Visibile/Collapsed. However when I tried to start control Collapsed (setting Visibility to collapsed in xaml Page) and then enabling this by changing Visibility to Visible that doesn't work. Visibility is set to Visible but ads are not showing. It only works when I start control Visible and then switch Visibility.
Coordinator
Jul 13, 2015 at 5:41 PM
Hmm, that certainly shouldn't be the case. IsEnabled is the correct solution for that. Will check in to it.

Setting the visibility to true however won't start ads, for that you would need to call the Invalidate(null); function to begin ad collection, this enables you to control when / if it should start even if the control is visible.
Jul 13, 2015 at 8:35 PM
Maybe I'm doing something wrong. I tried many ways with alternating Visibility, IsEnabled and IsAdRotatorEnabled value.
Here is my Control definition in xaml:
        <adRotator:AdRotatorControl x:Name="AdRotator" 
                                    AdWidth="800"
                                    AdHeight="90"                                 
                                    RemoteSettingsLocation="https://mylocation/defaultAdSettings.xml"
                                    VerticalAlignment="Bottom" 
                                    HorizontalAlignment="Center"
                                    AutoStartAds="True"
                                    IsEnabled="False"
                                    />
And in code I'm setting IsEnabled to true if I want to show ads and to false if I want to hide. With this configuration ads are visible from the start and changing value don't have any effect.
Coordinator
Jul 14, 2015 at 9:50 AM
I note one thing there. You have both AutoStartAds="true" and IsEnabled=False"

I think (but not checked) that AutoStart would override IsEnabled. You could try removing that property and it should be on the page and disabled when the page launches.
Jul 14, 2015 at 12:40 PM
What I found out so far, IsEnabled only result in disabling/enabling clicking on ads. Doesn't have any effects on visibility. Visiblity parameter works great. However when I start control Collapsed, they are not initiliazed and I need to call Invalidate by myself. This is not big problem, but.. but Invalidating results in nasty lag. When I'm calling invalidate in gameplay (that's when ads are showed) then this is very bad for player. So I figured out to call Invalidate at the start of application and hide ads just after they showed up. Is there some event what is fired after proper invalidating which I could use?