Bug 22369 - Multiline-text (variables) not showed in TextCell in Listview in iOS (only first line is showed)
Summary: Multiline-text (variables) not showed in TextCell in Listview in iOS (only fi...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-26 13:56 UTC by Fredy Wenger
Modified: 2015-05-28 07:22 UTC (History)
5 users (show)

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:

Description Fredy Wenger 2014-08-26 13:56:42 UTC
Xamarin.Forms, TextCell in a ListView, iOS:

We have a webservice to query data (JSON).
On the server-side (windows-service created with vb.net) we create a string for the address of customer.
At the end of each line to the addresse we add a cr-lf ( chr(13) + chr(10) )
CompanyXY <cr> + <lf>
StreetZ <cr> + <lf>
ZipX TownZ z <cr> + <lf>

Note: Maybe the cr-lf-chacters are changed automatically by json "over the net"...
However, I have to display this variable/field in a TextCell in a Listview:

Code snipped:
lvErgebnisAnzeige.ItemTemplate = new DataTemplate(typeof(TextCell));
lvErgebnisAnzeige.ItemTemplate.SetBinding(TextCell.TextProperty, "cAdresse");
...where cAdresse contains the address-string.

lvErgebnisAnzeige.ItemSelected += (sender, e) =>
  var eq = (Empfehlung)e.SelectedItem; 
  string cAnzeige = "Selektiert: " + eq.cAdresse.Trim() + " / Key: " + eq.iAnbieterKey;
  DisplayAlert("Empfehlung info", cAnzeige, "OK");

Problem description:
On WP (emulator) and on Android device the address is showed correct (2-4 Lines).
On iOS (iPhone and iPad) only the first line of the address is displayed.
The Alarm in the event-handler to ItemSelected (see above) also shows the correct (full) address (also on iOS).
Comment 1 Ram Chandra 2014-08-29 07:39:10 UTC
I have checked this issue but I am unable to reproduce this issue.

Could you please attached the sample application and build information? So, that we can reproduce this issue.

You can get build information from here: 

For Windows:
Visual Studio => Help => About Microsoft Visual Studio => Copy Info.

For Mac:
Xamarin Studio => About Xamarin Studio => Show details  => Copy Information.

Environment Info:

Xamarin.Forms :

Windows Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)

Mac Info:

Mac OS X 10.9.4
Mono 3.6.0 ((no/f540f8a)
Xcode 5.1.1 (5085)
Xamarin.iOS : (Business Edition)
Comment 2 Fredy Wenger 2014-08-29 08:56:51 UTC
Hi Ram

I have retested the issue on the iPhone (it really exists) and have done a little deeper investigation in the meantime.
B.t.w. This is very annoying as I always has to close the BH on MAC and VS2013 to be able to debug on iOS-devices (Bug “Another instance is connected…”
=> Do you know a state to this bug (“Another Instance is connected…”?

Additional Information:
I have placed a Label on another page with the same content (Address with 2-4 Lines and cr/Lf)
On this page the lines are showed correct also in iOS
So it seems, that the problem is not related to the data with cr-lf but to the TextCell (maybe in combination with Listview).

I also have tried to set the height of the Listview, so that there is surly enough space to display the data. Result: there was space showed around the text, but still only the first line was displayed.

lvErgebnisAnzeige = new ListView(); // without setting RowHeight
// lvErgebnisAnzeige = new ListView() { RowHeight = 200 };
// with setting RowHeight -> same behavior -> only first line is showed
lvErgebnisAnzeige.ItemTemplate = new DataTemplate(typeof(TextCell));
lvErgebnisAnzeige.ItemTemplate.SetBinding(TextCell.TextProperty, "cPFA_Adresse");

Conclusion once again:
- in WP-Emulator and Android (Tablet-HW) all the lines are showed
- in iOS only the first line is showed (also if set the RowHeight to a big value

Unfortunately I don't have a sample application (the date are queried from our Webservice via LAN)

Build information: -----------------------------------
Microsoft Visual Studio Professional 2013
Version 12.0.30501.00 Update 2
Microsoft .NET Framework
Version 4.5.51641

Installierte Version: Professional

LightSwitch für Visual Studio 2013   06177-004-0446016-02937
Microsoft LightSwitch für Visual Studio 2013

Office Developer Tools - Mai 2014 Update DEU   06177-004-0446016-02937
Microsoft Office Developer Tools für Visual Studio 2013 - Mai 2014 Update DEU

Rechtschreibprüfung für die Visual Studio 2013-Codeanalyse   06177-004-0446016-02937
Rechtschreibprüfung für die Microsoft® Visual Studio® 2013-Codeanalyse

Teile des International CorrectSpell™-Rechtschreibprüfungssystems © 1993 von Lernout & Hauspie Speech Products N.V. Alle Rechte vorbehalten.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Elektronische Version lizenziert von Lernout & Hauspie Speech Products N.V. Alle Rechte vorbehalten.

Team Explorer für Visual Studio 2013   06177-004-0446016-02937
Microsoft Team Explorer für Visual Studio 2013

Visual Basic 2013   06177-004-0446016-02937
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446016-02937
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446016-02937
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446016-02937
Microsoft Visual F# 2013

Windows Phone SDK 8.0 - DEU   06177-004-0446016-02937
Windows Phone SDK 8.0 - DEU

Allgemeine Azure-Tools   1.1
Bietet allgemeine Dienste für die Verwendung durch Azure Mobile Services und Windows Azure Tools.

ASP.NET und Webtools   2013.2.50425
Microsoft Web Developer Tools enthält die folgenden Komponenten:
Unterstützung beim Erstellen und Öffnen von ASP.NET-Webprojekten
Browserlink: Ein Kommunikationskanal zwischen Visual Studio und Browsern
Editor-Erweiterungen für HTML, CSS und JavaScript
Seitenprüfung: Prüfungstool für ASP.NET-Webprojekte
Gerüstbau: Ein Framework zum Erstellen und Ausführen von Codegeneratoren
Server Explorer-Erweiterungen für Windows Azure-Websites
Webpublishing: Erweiterungen zum Veröffentlichen von ASP.NET-Webprojekten für Hostinganbieter, lokale Server oder Windows Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.1.20409.0
For additional information, visit http://www.asp.net/

Gizmox Visual WebGui   7.1
Gizmox Visual WebGui Version 7.1

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone

NuGet-Paket-Manager   2.8.50313.46
NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter "http://docs.nuget.org/".

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio-Erweiterung zur Visualisierung aggregierter Zusammenfassungen vom PreEmptive Analytics-Produkt.

SQL Server Data Tools   12.0.30919.1
Microsoft SQL Server Data Tools

Windows Azure Mobile Services Tools   1.1
Windows Azure Mobile Services Tools

Windows Phone 8.1 SDK-Integration   1.0
Dieses Paket integriert die Tools für das Windows Phone 8.1 SDK in die Menüs und Steuerelemente von Visual Studio.

Workflow Manager Tools 1.0   1.0
Dieses Paket enthält die erforderlichen Visual Studio-Integrationskomponenten für Workflow Manager.

Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android

Comment 3 Ram Chandra 2014-08-29 11:00:08 UTC
I have check this issue and I am able to reproduce this issue

Steps to reproduce:

1. Create a Blank App (Xamarin.Forms Portable) on VS 2013.
2. Add a new content page and write the following code.
using System;
using System.Collections.Generic;
using Xamarin.Forms;

namespace adsfasfa
 class ListViewDemoPage : ContentPage
  class Person
   public Person(string address)
    this.Address = address;
   public string Address { private set; get; }
        public ListViewDemoPage()
            Label header = new Label
                Text = "ListView",
                Font = Font.BoldSystemFontOfSize(50),
                HorizontalOptions = LayoutOptions.Center

           List<Person> people = new List<Person>
                new Person("CompanyXY <cr> + <lf>\n StreetZ <cr> + <lf> ZipX TownZ z <cr> + <lf>" ),
                new Person("CompanyXY StreetZ ZipX" )              

            ListView objListView = new ListView() { RowHeight = 200 };
            objListView.ItemsSource = people;
            objListView.ItemTemplate = new DataTemplate(typeof(TextCell));
            objListView.ItemTemplate.SetBinding(TextCell.TextProperty, "Address");
            objListView.ItemSelected += (sender, e) =>
                var eq =(Person) e.SelectedItem;
               DisplayAlert("Address info", eq.Address, "OK");

            this.Content = new StackLayout
                Children = 

3.  Call the above attached page from app.cs file
          return new NavigationPage (new ListViewDemoPage ()); 

4.  Debug the application.

I observed that on Text cell I am also not getting the full string. However when I click on the that row I am getting full string on alert box. 

I also observed that my string contains "\n" character and after that Textcell doesn't display the other part of string. If I remove the the "\n" character, textcell display the full string.

Screencast: http://screencast.com/t/gfcItqPx

Environment Info:

Xamarin.Forms :

Windows Info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin (0b2a123923812a88ed3091909478dbe9e0111f00)

Mac Info:

Mac OS X 10.9.4
Mono 3.6.0 ((no/f540f8a)
Xcode 5.1.1 (5085)
Xamarin.iOS : (Business Edition)
Comment 4 Fredy Wenger 2014-08-29 11:11:45 UTC
Hi Ram
Thanks for your effort to reproduce the bug:-)
Comment 5 Fredy Wenger 2015-05-28 07:22:09 UTC
As I don't see this bug in the latest XF-Version I set this bug to solved myself to help Xamarin by the clean-out of Bugzilla.