From 8af4dd8c71a68d872e02b6e3713cddc6fa4df4ce Mon Sep 17 00:00:00 2001 From: Edward Brey Date: Wed, 7 Nov 2018 07:12:24 -0600 Subject: [PATCH] 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. --- Xamarin.Forms.Core/ToolbarItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Xamarin.Forms.Core/ToolbarItem.cs b/Xamarin.Forms.Core/ToolbarItem.cs index 41cf144..54f2812 100644 --- a/Xamarin.Forms.Core/ToolbarItem.cs +++ b/Xamarin.Forms.Core/ToolbarItem.cs @@ -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; } } } -} \ No newline at end of file +} -- 2.7.4