Bug 24263 - Binding fails for a binding to an element in a string array
Summary: Binding fails for a binding to an element in a string array
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL: https://github.com/xamarin/Duplo/issu...
Depends on:
Blocks:
 
Reported: 2014-11-04 18:33 UTC by John Miller [MSFT]
Modified: 2014-11-08 17:27 UTC (History)
4 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:
RESOLVED FIXED

Description John Miller [MSFT] 2014-11-04 18:33:10 UTC
**Overview:**

   A binding like this will fail:
   myLabel.SetBinding (Label.TextProperty, new Binding("Names[0]"));

**Steps to Reproduce:**

   1. Create a model with a string[] property Names
   2. Set the binding context of the label to the model class
   3. Set a binding of that label for the text property. i.e. 
   
   myLabel.SetBinding (Label.TextProperty, new Binding("Names[0]"));

**Actual Results:**

   > "Binding: '0' property not found on 'System.String[]', target property: 'Xamarin.Forms.Label.Text'"

**Expected Results:**

   The Text property should have the value of the Names[0] element. 

**Build Date & Platform:**

   XF 1.2.3