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

Observable Collections not updating UI in Listbox (WinRT, 8.1)

$
0
0

Hi All,

I have a page that has a ListView on it, that is bound to an ObservableCollection.

In WinRT (Windows 8.1) I have noticed that when returning to a page that is already in the navigation stack (with a PopAsync) that if items in the ObservableCollection get changed, that the ListBox removes the elements that have changed that should be displaying. See attached file for example. The image on the left is 8.0, the image on the right is 8.1.

Has anyone else experienced this?

The Listview looks like this:

<ListView x:Name="PickupListView" ItemTapped="PickupTapped" VerticalOptions="Fill">
        <ListView.ItemTemplate>
          <DataTemplate>
            <ViewCell>
              <Grid HeightRequest="80" RowSpacing="0">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="30"/>
                  <ColumnDefinition Width="28"/>
                  <ColumnDefinition Width="15"/>
                  <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition/>
                  <RowDefinition Height="2"/>
                </Grid.RowDefinitions>
                <BoxView BackgroundColor="#014188" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4"/>
                <Label Text="{Binding Icon}" Grid.Column="1" Grid.Row="0" FontSize="{Binding IconSize}" FontFamily="/Assets/Fonts/fontawesome-webfont.ttf#FontAwesome" VerticalOptions="Center" TextColor="{Binding IconColor}"/>
                <Grid Grid.Row="0" Grid.Column="3" VerticalOptions="Center" RowSpacing="2" Padding="0,5,0,0">
                  <Label Text="{Binding Description}" TextColor="White" Grid.Column="0" Grid.Row="0" FontSize="{Binding FontSize}" FontFamily="/Assets/Fonts/VAG-Rounded-Std-Light_47298.ttf#Vag Rounded Std" YAlign="End"/>
                  <Label Text="{Binding SubDescription}" TextColor="White" Grid.Column="0" Grid.Row="1" FontSize="{Binding SubFontSize}" FontFamily="/Assets/Fonts/VAG-Rounded-Std-Light_47298.ttf#Vag Rounded Std" YAlign="Start"/>
                </Grid>
              </Grid>
            </ViewCell>
          </DataTemplate>
        </ListView.ItemTemplate>
      </ListView>

Viewing all articles
Browse latest Browse all 91519

Trending Articles



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