Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Left toolbaritems in Xamarin Forms

$
0
0

Summary

Currently we can not place toolbaritems on the left side, on default. It's possible to write a renderer for the ContentPage on ios (see https://timeyoutake.it/2016/01/02/creating-a-left-toolbaritem-in-xamarin-forms/).
But it would be nice if we can place toolbaritems on the left on default.

API Changes

In order to place a toolbaritem on the left, a property is added to the ToolbarItem class:

ToolbarItem toolbarItem = new ToolbarItem();
toolbarItem.Position = ToolbarItemPosition.Left;

public enum ToolbarItemPosition
{
    Left, Right
}

where ToolbarItemPosition.Right is the default.

Intended Use Case

We can use this in every situation where you want a toolbarItem on the left side. A very common situation is a detailpage with "Cancel" on the left side and "Save" on the right side:


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>