Programmatically Changing the Show and Hide Ribbon Navigation Setting
Much like everything I blog about, I had a requirement from a customer to programmatically set the "Show and Hide Ribbon" setting that is seen within the Navigation configuration page off of Site Settings (a.k.a. the _layouts/AreaNavigationSettings.aspx page). I looked all through the SPWeb.Navigation options and the PublishingWeb.Navigation options and couldn't find it. Then I remembered the oldest trick in the book, decompiling SharePoint! I brought up the Microsoft.SharePoint.Publishing.dll in Telerik JustDecompile and found the codebehind implementation for the page. Once there it was easy to figure out how to make the change. Fast-forward, here it is: