зеркало из https://github.com/DeGsoft/maui-linux.git
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:
Родитель
b9713b7af1
Коммит
8af4dd8c71
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче