Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

I got this error: "Guid" can not be converted to type 'System.String' Also what is this other error?

$
0
0

Hello everyone, I am just a beginner in programming with xaml and I need help to understand this things I am encountering during programming, and to know how to solve them.

I am trying to bind in my xaml a collection from my observablecollection that has a property guid, I cannot actually display it since only takes string, my question is what code can I use to convert guid into string?

<ListView x:Name="listView" SeparatorVisibility="None">
        <ListView.ItemTemplate>
            <DataTemplate>
        <TextCell Text="{Binding Guid}" TextColor="Black" />
        <TextCell Text="{Binding String}" TextColor="Black" />
        </DataTemplate>
        </ListView.ItemTemplate>
</ListView>

And also if I add two text cell in xaml, this error or blue lines shows up:
"The property 'ElementTemplateContent' is set more than once" Is this because I am using listview? and from what I observed, the collection added in my observablecollection which is the itemsource in this case, displays "Guid" (But only shows with an empty text), then displays "String" (with a text) even if I just use this one line of xaml code.

<TextCell Text="{Binding String}" TextColor="Black" />

Thanks in advance!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>