Bug 48428 - [UWP] Labels inside ViewCell disappear after screen refresh
Summary: [UWP] Labels inside ViewCell disappear after screen refresh
Status: RESOLVED DUPLICATE of bug 40139
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-30 14:42 UTC by Ibon
Modified: 2017-01-19 18:05 UTC (History)
5 users (show)

Tags: UWP, ViewCell, Label
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:
Status:
RESOLVED DUPLICATE of bug 40139

Description Ibon 2016-11-30 14:42:44 UTC
Xamarin 4.2.1.64 (872717c)

In UWP when the screen is refreshed the labels inside a ViewCell disappear. This is not a bounding issue for those are presented correctly and updated if the collection changes.

TextCell and ImageCell work fine and also does ViewCell if it contains different objects such as Images or Entries.

I can't reproduce this on my developing PC but this is easily replicated on my Surface Pro tablet and a Dell laptop (see System Information below).

Dell Information: http://www.screencast.com/users/ibonsanvi/folders/Default/media/0a57b190-3ab6-4947-a35a-0840036a6735

Surface Information: http://www.screencast.com/users/ibonsanvi/folders/Default/media/ceac3af8-4c5b-45a3-9a88-b7680cab11d6

Please check this gif where I reproduce the issue: http://www.screencast.com/users/ibonsanvi/folders/Default/media/922f3573-464b-49b1-89c8-16151ef4812b

It has been hard to replicate this, firstly I thought that this was some problem with Suspension and resume but that is working fine. 

Working on the laptop I realized that the issue happened when the clock chagend from xx:59 to xx:00 (no desktop image change there) and finally I was able to replicate it this way on Surface Pro. 

Nothing I´ve tried has fixed this:

- Set x:Name for labels
- Set Height and Width request
- Set grid containing the list
- Set grid inside the View Cell and Grid.Row plus Grid.Column properties on labels

Xaml code (Labels):

<Label>ViewCell - Labels</Label>
<ListView x:Name="List1"  IsPullToRefreshEnabled="True" HasUnevenRows="True" SeparatorVisibility="None">

    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell >

                <StackLayout BackgroundColor="{Binding BackgroundColor}" Style="{StaticResource StackImg}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="5">

                    <Image  x:Name="profile" IsVisible="{Binding DisplayImage}" Source="{Binding Image}" WidthRequest="48" HeightRequest="48" Aspect="AspectFill"/>
                    <StackLayout Orientation="Vertical">
                        <Label Text="{Binding Title}" Style="{StaticResource ListHeading}" LineBreakMode="CharacterWrap"  />
                        <Label Text="{Binding Details}" Style="{StaticResource ListSubHeading}" LineBreakMode="TailTruncation"/>
                    </StackLayout>
                </StackLayout>

            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>

</ListView>


(Entries)

<Label>ViewCell - Entries</Label>
<ListView x:Name="List6" IsPullToRefreshEnabled="True" HasUnevenRows="True" SeparatorVisibility="None">

    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell >

                <StackLayout BackgroundColor="{Binding BackgroundColor}" Style="{StaticResource StackImg}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Padding="5">

                    <Image  x:Name="profile" IsVisible="{Binding DisplayImage}" Source="{Binding Image}" WidthRequest="48" HeightRequest="48" Aspect="AspectFill"/>
                    <StackLayout Orientation="Vertical">
                        <Entry Text="{Binding Title}"  HorizontalOptions="FillAndExpand"/>
                        <Entry Text="{Binding Details}" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                </StackLayout>

            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>

</ListView>


C# Code: Observable collection of elements inheriting from INotifyPropertyChanged. ListView Bound in C#.

Could provide if required.
Comment 1 Ibon 2016-11-30 14:47:38 UTC
I have also tried without styled elements and inserting hardcoded labels (not filling from observable collection) inside the Data Template.

The result was the same: the labels inside the ViewCell disappear.
Comment 2 David 2017-01-18 03:06:51 UTC
This is a very, very serious issue that needs to be addressed urgently. It effectively makes XF unusable for UWP apps that contain lists with data that may be updated. Customers will not stand for apps where data just disappear from Lists. It may be related to https://bugzilla.xamarin.com/show_bug.cgi?id=44973.
Comment 3 Paul DiPietro [MSFT] 2017-01-19 18:05:15 UTC

*** This bug has been marked as a duplicate of bug 40139 ***