Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In our app, we need to load a set of tabs up in to a TabbedPage, and then toggle the visibility of each tab given some criterion. However, setting the IsVisible flag on a give Page (ContentPage) in this case doesn't hide the tab. It hides the Content of the tab, but the Title of the ContentPage is left in the set of tabs. This should be made invisible when the ContentPage has its IsVisible property set to false.
In order to recreate the problem, please clone this repo, and run one of the samples (UWP or Android - iOS not tested):
Click on the button "Invisible Panels". You will notice that it displays 3 tabs, and none of the tabs have content. However, the IsVisible property of each tab (ContentPage) has been set to false so the tabs' Title should not display.
I believe I was able to reproduce this with the project linked to in the description. When IsVisible = false on a child tab page the content was hidden, but the tab itself was not so it was still possible to navigate/swipe to it.
I tested this on iOS, Android, and UWP and the behavior described above was consistent across all platforms. This would indicate that the IsVisible property is not currently utilized to determine if the tab should be present or removed. In this case, this issue can be classified as an enhancement request and would be best suited as a UserVoice suggestion or a proposal in our Evolution forum for future consideration.
For now, in order to remove the title and the tab you will have to remove the page from TabbedPage.Children. If using XAML, you may be able to create a bindable property in your children pages that will handle this when the property is changed.
Annoying issue, especially when using MVVM.
Thanks Jimmy. Yes, you have grasped the issue.
We have worked around the problem in the way that you have described, but it is non standard behaviour for a tab based control.
And btw, I tried creating a behavior that is attached to the IsVisibile property (via PropertyChanged event), but I couldn't get it to work.
@Melbourne, can you please share your workaround?