Updated on January 7, 2017
Move your Xamarin.Forms Toolbar to the bottom on Windows
While iOS and Android typically have their toolbars and menus at the top of the page, on Windows you will find it at the bottom in most cases. Unfortunately, Xamarin.Forms renders all toolbar to the top of the page per default, even on Windows. So if you define a toolbar like this, it will appear at the top of the page, when running the Winows application, which is very uncommon there and might look strange to a Windows user.
<ToolbarItem Text="Settings" Icon="Gears.png" />
Previously, you had to write a custom renderer, to modify the toolbar. Xamarin.Froms 2.3.3, which has faced its stable release a couple of days ago, introduces Platform-Specifics, that can modify some UI elements for specific platforms. The toolbar is one of them and we can attach a ToolbarPlacement to it with a single line of code.
MainPage = new NavigationPage(new MainPage());
However, these Platform-Specifics are still very limited, so we have to keep in mind that
- Toolbar Placement can only be set application wide, not per page
- Toolbar Placement can only be set on a
But it works and it is only one single line, that gives a Xamarin.Forms app on Windows a way more natural look!