Bug 21830 - static button text not centered when binding another button text to a Command
Summary: static button text not centered when binding another button text to a Command
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-05 12:05 UTC by Leo Olivers
Modified: 2015-02-06 02:38 UTC (History)
6 users (show)

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


Attachments
solution with repro case (2.96 MB, application/x-zip-compressed)
2014-08-05 12:05 UTC, Leo Olivers
Details


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 Leo Olivers 2014-08-05 12:05:34 UTC
Created attachment 7588 [details]
solution with repro case

a Xamarin ContentPage is bound to a custom viewmodel

the page contains 3 buttons, 1 of which is bound to a Command on the viewmodel

this bound button also binds its Text property to a property on the viewmodel, so that we can control the button caption from the viewmodel

now, when this button text property changes in the viewmodel (and the corresponding text caption on the button as well), and the user subsequently clicks on any of the 2 other buttons, the caption for those 2 other buttons changes from centered to left aligned text. This does not seem normal

Btw, the text on the bound button remains centered as before and behaves correctly
Comment 1 Parmendra Kumar 2014-08-11 14:28:40 UTC
I have checked this issue and able to reproduce this with attached sample
project. To reproduce this issue we follow the given above steps.
I have observed that When we clicks a button,other button's label moves from a center alignment to a left alignment.

Screencast: http://www.screencast.com/t/6tPsvpkzO

Environment info:
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.3.47.0 (0b2a123923812a88ed3091909478dbe9e0111f00)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android
Comment 2 Rui Marinho 2015-02-05 12:38:25 UTC
This is fixed in 1.3.2
Comment 3 Parmendra Kumar 2015-02-06 02:38:21 UTC
I have checked this issue with Xam.Forms 1.3.3.6321-pre2 and now its working fine .

Hence closing this issue.