Bug 59159 - Cannot provide design time data to TableViews in forms
Summary: Cannot provide design time data to TableViews in forms
Status: NEEDINFO
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-31 21:39 UTC by Bret Johnson [MSFT]
Modified: 2017-10-19 15:58 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Designer log (16.18 KB, text/plain)
2017-08-31 21:39 UTC, Bret Johnson [MSFT]
Details


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 for Bug 59159 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEEDINFO

Description Bret Johnson [MSFT] 2017-08-31 21:39:45 UTC
Created attachment 24507 [details]
Designer log

Clone and build the Acquaint sample app: https://github.com/xamarinhq/app-acquaint

For the Debug build, changing the Linking from "Sdk Assemblies Only" to None. That's needed to work around another bug (https://bugzilla.xamarin.com/show_bug.cgi?id=59115)

Open the Previewer on the AcquaintanceEdtPage.xaml

Result: The Previewer page is completely blank, with no error message nor anything else--just solid white. I'm not sure what's going on here, but it doesn't seem right. Logs are attached.

Here's the XAML, btw:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Acquaint.XForms.AcquaintanceEditPage">
	<ContentPage.ToolbarItems>
		<ToolbarItem Text="Save" Icon="save.png" Command="{Binding SaveAcquaintanceCommand}" />
	</ContentPage.ToolbarItems>
	<ContentPage.Content>
		<ContentView x:Name="TopContentView">
			<ContentView.Padding>
				<OnPlatform x:TypeArguments="Thickness" WinPhone="10" />
			</ContentView.Padding>
			<ContentView.Content>
				<TableView Intent="Settings" BackgroundColor="White">
					<TableRoot>
						<TableSection Title="Name">
							<EntryCell Label="First" Text="{Binding Acquaintance.FirstName}" Keyboard="Text" />
							<EntryCell Label="Last" Text="{Binding Acquaintance.LastName}" Keyboard="Text" />
						</TableSection>
						<TableSection Title="Employment">
							<EntryCell Label="Company" Text="{Binding Acquaintance.Company}" Keyboard="Text" />
							<EntryCell Label="Title" Text="{Binding Acquaintance.JobTitle}" Keyboard="Text" />
						</TableSection>
						<TableSection Title="Contact">
							<EntryCell Label="Phone" Text="{Binding Acquaintance.Phone}" Keyboard="Telephone" />
							<EntryCell Label="Email" Text="{Binding Acquaintance.Email}" Keyboard="Email" />
						</TableSection>
						<TableSection Title="Address">
							<EntryCell Label="Street" Text="{Binding Acquaintance.Street}" Keyboard="Text" />
							<EntryCell Label="City" Text="{Binding Acquaintance.City}" Keyboard="Text" />
							<EntryCell Label="State" Text="{Binding Acquaintance.State}" Keyboard="Text" PropertyChanged="StateEntry_PropertyChanged" />
							<EntryCell Label="ZIP" Text="{Binding Acquaintance.PostalCode}" Keyboard="Numeric" PropertyChanged="PostalCode_PropertyChanged" />
						</TableSection>
					</TableRoot>
				</TableView>
			</ContentView.Content>
		</ContentView>
	</ContentPage.Content>
</ContentPage>
Comment 1 Bret Johnson [MSFT] 2017-08-31 22:00:48 UTC
Note - sometimes other pages in this project intermittently have this behavior too. I think it's as much caused by previewer state as this particular page.
Comment 2 Alan McGovern 2017-08-31 22:16:42 UTC
Can you include all the log files? The android log is just a subset of the important informatioN! :)
Comment 3 Alan McGovern 2017-08-31 22:20:02 UTC
Oh, actually this is probably another "not a previewer bug" issue.

This is TableView. Presumably it needs a data source so it can create and populate cells. If you supply no data you get no cells. This requires changes on Forms side to allow setting design time data via xaml. Once those are in place it will Just Work.

Does that make sense?
Comment 4 Bret Johnson [MSFT] 2017-09-01 00:45:10 UTC
Yeah, makes sense. I did a little more testing to confirm other content displays, but the TableView, with it's white background color, only shows a big white rectangle.

What's the appropriate bugzilla resolution here? I was looking for a "by design" choice, but not sure which one that is.  Resolved / Invalid?
Comment 5 Alan McGovern 2017-09-01 10:20:49 UTC
We should assign it to Xamarin.Forms so they provide a mechanism for providing design time data.

The live player single page rendering mechanism they're planning on introducing will have the exact same problem, so perhaps they will be able to prioritise a proper fix since it affects both!
Comment 6 Bret Johnson [MSFT] 2017-09-04 21:00:26 UTC
FYI - Motz said on Friday that the LivePlayer single page rendering does support Forms design time data. He seemed confident in that, but we should confirm.
Comment 7 Alan McGovern 2017-09-04 21:28:13 UTC
Then so do we! Whatever works for it will work for us! What technique does he use there? Xaml is xaml and we don't do anything except give it to forms to render :)
Comment 8 Paul DiPietro [MSFT] 2017-10-19 15:37:38 UTC
For upkeep, did we ever come to a resolution on this? Can this be closed?
Comment 9 Alan McGovern 2017-10-19 15:58:25 UTC
If Xamarin.Forms exposes a supported mechanism for setting design time data and values then we are probably done. However, no-one from Forms has ever confirmed the existence of this feature so I am curious as to what it is and how it works.

Let's close this once the feature is confirmed to exist. Ideally once we have documentation too as people keep asking for this.