第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

列表中的數(shù)據(jù)綁定列表,uwp + xaml

列表中的數(shù)據(jù)綁定列表,uwp + xaml

C#
明月笑刀無情 2021-05-19 17:14:53
我有以下模型:public class TableData{    [JsonProperty(PropertyName = "objectsDetected")]    public List<ObjectsDetected> ObjectsDetected { get; set; }    [JsonProperty(PropertyName = "file_name_at_upload")]    public int File_Name_At_Upload { get; set; }}public class ObjectsDetected{    [JsonProperty(PropertyName = "className")]    public string className { get; set; }    [JsonProperty(PropertyName = "score")]    public double score { get; set; }}我從一個api調(diào)用獲取我的數(shù)據(jù):        var request = (HttpWebRequest)WebRequest.Create("http://localhost:58941/api/data");        request.Method = "GET";        request.ContentType = "application/json";        WebResponse response = await request.GetResponseAsync();        if (response != null)        {            string responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();            List<TableData> myDeserializedObjList = (List<TableData>)JsonConvert.DeserializeObject(responseString, typeof(List<TableData>));            cosmosData.ItemsSource = myDeserializedObjList;        }這是XAML代碼:    <StackPanel>        <Grid>            <Grid.ColumnDefinitions>                <ColumnDefinition Width="200"/>                <ColumnDefinition Width="200"/>            </Grid.ColumnDefinitions>            <TextBlock Grid.Column="0" Text="Navn p? billede" Foreground="Black" FontSize="20" FontWeight="Bold"/>            <TextBlock Grid.Column="2" Text="Kategori fundet" Foreground="Black" FontSize="20" FontWeight="Bold"/>        </Grid>            <GridView x:Name="cosmosData"                      ItemClick="cosmosData_ItemClick"                      IsItemClickEnabled="True"                      IsSwipeEnabled="true"                      SelectionMode="Single">                <GridView.ItemTemplate>                <DataTemplate x:DataType="local:TableData">我想在同一表中的用戶界面TableData和ObjectsDetected.classname中顯示,但是我無法訪問ObjectsDetected.classname?我怎樣才能做到這一點(diǎn)?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 148 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號