const string _partBackButton = "elm.swallow.prev_btn";
const string _leftToolbar = "title_left_btn";
const string _rightToolbar = "title_right_btn";
+ const string _leftToolBarButtonStyle = "naviframe/title_left";
+ const string _rightToolbarButtonStyle = "naviframe/title_right";
const string _defaultToolbarIcon = "naviframe/drawers";
const string _partTitle = "default";
const string _styleBackButton = "naviframe/back_btn/default";
control.Activate();
};
button.Text = item.Text;
- button.BackgroundColor = Xamarin.Forms.Color.Transparent.ToNative();
+ button.BackgroundColor = Color.Transparent.ToNative();
- if (String.IsNullOrEmpty(item.Icon) && String.IsNullOrEmpty(item.Text))
+ if (string.IsNullOrEmpty(item.Icon))
{
- button.Style = _defaultToolbarIcon;
+ if (string.IsNullOrEmpty(item.Text))
+ {
+ // We assumed the default toolbar icon is "naviframe/drawer" if there are no icon and text.
+ button.Style = _defaultToolbarIcon;
+ }
+ else
+ {
+ if (item.Order == ToolbarItemOrder.Secondary)
+ {
+ button.Style = _leftToolBarButtonStyle;
+ }
+ else
+ {
+ // We assumed both primary or default order as right toolbar button
+ button.Style = _rightToolbarButtonStyle;
+ }
+ }
}
else
{