Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: Databinding to an array of strings

    Mar 31, 2008 08:45 PM | LINK

    Currently this isn't supported by DataBinding.  here's the note in the docs:

    "If you are familiar with WPF data binding, WPF supported property path techniques for retrieving indexed items in a collection, and retrieving attached property values. Silverlight currently does not provide this support. A Silverlight property path is a series of steps into an object model and only supports the "dotted" syntax."
     

    If you change the data you're using to a Dictionary (probably a better solution anyway) then you can bind to the Name or Value of each item and is likely going to be a more workable solution.  If you are getting this data via a web service, try the advanced settings to change from Array's to a better collection type.

     

    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop