0

I've provided a link to a fairly simple, drilled down version of our app. What you will see in it is that I've a simple Forms app consisting of 2 pages. My first page just has a button to navigate to a second page. My Second page has a TableView with Custom ViewCells using EntryRenderer on Windows Phone.

This was all working fine up until XF 1.5 & then we decided to upgrade to XF 2.0 Now it does not work. All my entries in that custom view cell are shrunk to a height of 1 pixel.

Here is the glitch though. I figured that if the page using the table view with custom viewCell & entry renderers is the first page of your app then all works fine.. but if it's somewhere in in the navigation stack.. then you will see all entries are shrunk.

Attached is a sample project. If you run it as it is you will see a page that looks beautiful. If you comment the MainPage = new NavigationPage(new SecondPage()); & uncomment the MainPage = new NavigationPage(new FirstPage());

On App.cs & run the app again on the WP device you will see the issue I am referring to.

A fix is really appreciated for it.

Here is the sample code:

https://github.com/supreettare/TableViewInWP

Thanks

4

2 回答 2

1

在 Forms 1.5 和 2.0 之间进行了许多必要的更改,因此随着时间的推移,一些新的错误可能会出现。在这种情况下,最短的答案是存在一个涉及导航方式和布局渲染时间的错误;它似乎也会影响正常的条目单元格,只要它们在您的示例项目显示的网格内。因此,此问题已得到确认,并应在未来版本的 Forms 中解决。

现在一个潜在的解决方法是HeightRequest为相关条目设置 a 或Grid.RowDefinition为 Grid 本身添加值(带有高度)。这可能会导致一些尴尬的填充作为副作用,但条目应该按预期显示。

于 2015-12-02T18:48:52.423 回答
-1

我不能发表评论,因为我没有 50 的声誉对不起......

我下载了示例,部署在真正的 android 手机上并且可以工作。然后我评论你写的我看到导航按钮点击它,我看到一切正常......如果直接加载或从导航加载,则相同页面。

我认为您的问题可能出在您的模拟器或 xamarin 表单更新中。

我从 1.5 更新到 2.0 时遇到了很多问题。

于 2015-12-02T12:52:56.263 回答