0

私がTabbedPageやろうとしているのは、jsonListViewContentPageMainPage の下にある にストリーミングすることです。

私が理解できる限り、失われたのは xaml に変換するときに発生します。

誰でもこれで私を助けることができますか?

私のコードは次のようになります。

私のC#ファイル

void OnListViewItemSelected(object sender, SelectedItemChangedEventArgs eventInfo)
{
    if (eventInfo.SelectedItem != null)
    {
        cityItem clickedCityName = (cityItem)eventInfo.SelectedItem;

        System.Diagnostics.Debug.WriteLine(clickedCityName.cityAddress);
        citiesListView.SelectedItem = null;

        SingelCityPage pcity = new SingelCityPage ();
        pcity.currentCity = clickedCityName;

        //Looks like I am missing something here but I don't find any reference.
        //or is in the XML that its missing the connection? 
        Navigation.PushAsync(pcity);
        }
    }

私のXaml

<ContentPage.Content>
    <StackLayout>
        <ListView x:Name="citiesListView">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>
                          <ViewCell.ContextActions>
                                <AbsoluteLayout Padding="10,10,10,10">
                                    <Label Text="{Binding cityName}" AbsoluteLayout.LayoutBounds="0.0, 0.0, 0.75, 0.5" AbsoluteLayout.LayoutFlags="All" />
                                    <Label Text="{Binding cityLocation}" AbsoluteLayout.LayoutBounds="0.0, 1.0, 0.75, 0.5" AbsoluteLayout.LayoutFlags="All" />
                                    <Label Text="{Binding cityAdress}" AbsoluteLayout.LayoutBounds="1.0, 0.0, 0.5, 1.0" AbsoluteLayout.LayoutFlags="All" />
                                </AbsoluteLayout>
                          </ViewCell.ContextActions>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView> 
    </StackLayout>
</ContentPage.Content>
4

1 に答える 1