Bug 26809 - ToolbarItem not refreshing its name.
Summary: ToolbarItem not refreshing its name.
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 1.3.4
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-06 12:02 UTC by laygr
Modified: 2015-02-11 14:49 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description laygr 2015-02-06 12:02:52 UTC
When changing a ToolbarItem's text, the variable ToolbarItem.Text is updated, but the view is not.

To replicate it, run in a Page inside a NavigationPage:

public PageInsideANavigationPage ()
{
    InitializeComponent ();
			
    var ti = new ToolbarItem ();
    ti.Text = "a";
    ti.Clicked += (sender, e) => {
	ti.Text = ti.Text + "a";
	System.Diagnostics.Debug.WriteLine("New text: " + ti.Text);
    };
    ToolbarItems.Add (ti);
}

When clicking the ToolbarItem,
the ToolbarItem will display only: "a",
while the console will show "New text: aaa"
Comment 1 laygr 2015-02-06 12:04:21 UTC
I made a mistake in the very last line, it should be: while the console will show "New text: aa"
Comment 2 laygr 2015-02-06 12:09:31 UTC
Oh, and it happens on the iPhone Simulator. I don't know if it also happens on Android.
Comment 3 Jason Smith [MSFT] 2015-02-07 06:11:05 UTC
this is fixed in 1.3.4-pre1
Comment 4 Ram Chandra 2015-02-11 14:49:37 UTC
I have checked this issue with following builds:

Xamarin.Forms: 1.3.4.6328-pre2
Xamarin Studio: 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
Xcode 6.1 (6604)
Build 6A1052d
Xamarin.iOS  8.6.1.20 (Business Edition)
Xamarin.Android : 4.20.0.28 (Business Edition)
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

When I click the toolbarItem, I observed that the toolbar item display updated value for both iOS and android.

Screencast: http://www.screencast.com/t/IJjmeGHlIZ (for Android) 
                    http://www.screencast.com/t/iGyRmLwfl (for iOS)

This issue has been fixed. Hence I am closing this issue.