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.
Created attachment 14971 [details]
Sample project showing inability to adjust the divider line color
There appears to be no way to customize the 1px divider shown on iPad on the MasterDetailPage which divides between the master and the detail views - it is always gray. This is very noticeable when making a dark themed app.
So far I have tried the following:
Create a custom TabletMasterDetailRenderer, and try to set any of the following:
The following forum thread suggests it is possible via a custom renderer as above, however it has no effect on an iPad (iOS 9.2) simulator:
Attached is a sample project. If you search for 'Lime' you will find all the ways I have tried to set the divider color with no luck. I will also attach a screenshot showing the line I am referring to.
Created attachment 14972 [details]
Image showing line whose color needs to be changeable
Upon further research a few discoveries were made:
1) Setting the divider color is done by simply setting the BackgroundColor for the MasterDetailPage - there is no need for a custom renderer
2) The divider is always gray on iPad if the drawer can be open/closed. This would be the case if the iPad is in portrait mode, or if MasterDetailPage.MasterBehavior is set to MasterBehavior.Popup so that the drawer can be open/closed in landscape
3) The only scenario where the divider color works reliably on iPad is in landscape mode with MasterDetailPage.MasterBehavior set as the default
I'll attach a new simple sample project to show these issues. The test project has a blue drawer, a red detail page, and sets the MasterDetailPage.BackgroundColor to black. It also has a custom renderer which sets the MasterDetailpage.BackgroundColor to green. You'll find that while both routes work when the drawer cannot be opened/closed, neither route works when the drawer can be opened/closed.
Created attachment 14989 [details]
Updated sample project showing issue with divider line when drawer can be opened/closed
I looked at this and could confirm that there doesn't seem to be a way to style the divider line. I think this is an iOS limitation rather than XF issue. It's strange that Apple has not provided an easy way to style the divider. I tried playing around with colors as well as adding subviews to different views. Nothing seemed to work.