Make ToolbarItem constructor match properties (#4333)

This changes the `ToolbarItem` constructor's `name` parameter to `text`, to match the non-obsolete `Text` that gets the value. Without the change, it's confusing when tracing data flow related to `Text`, since it doesn't appear at first that it's being set.
This commit is contained in:
Edward Brey 2018-11-07 07:12:24 -06:00 коммит произвёл Stephane Delcroix
Родитель b9713b7af1
Коммит 8af4dd8c71
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -16,12 +16,12 @@ namespace Xamarin.Forms
{
}
public ToolbarItem(string name, string icon, Action activated, ToolbarItemOrder order = ToolbarItemOrder.Default, int priority = 0)
public ToolbarItem(string text, string icon, Action activated, ToolbarItemOrder order = ToolbarItemOrder.Default, int priority = 0)
{
if (activated == null)
throw new ArgumentNullException("activated");
Text = name;
Text = text;
Icon = icon;
Clicked += (s, e) => activated();
Order = order;
@ -54,4 +54,4 @@ namespace Xamarin.Forms
remove { Clicked -= value; }
}
}
}
}