2016-08-10 34 views
1

Xamarin.Forms中的新功能,在VS社區2015上工作,構建一個應用程序到Android棒棒糖模擬器。 我正嘗試插入編輯成的TableView,像這樣:Xamarin.Forms編輯器HeightRequest在一個TableView中

<?xml version="1.0" encoding="utf-8" ?> 
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> 
<ContentPage.Content> 
    <StackLayout> 
    <TableView x:Name="table" Intent="Form"> 
    <TableRoot> 
    <TableSection Title="My note"> 
     <ViewCell> 
     <StackLayout> 
     <Editor BackgroundColor="#FFFF8D" 
       HeightRequest="200" 
       Text="Text on Yellow background" /> 
     </StackLayout> 
     </ViewCell> 
    </TableSection> 
    </TableRoot> 
    </TableView> 
    </StackLayout> 
</ContentPage.Content> 
</ContentPage> 

大廈爲Android,HeightRequest不起作用。只顯示一條編輯器。

它完美沒有的TableView中的結構(沒有的tableView,根,段和內StackLayout) 我在做什麼錯? 在此先感謝。

回答

2

您需要爲TableView設置HasUnevenRows屬性爲true。這將允許行完全包含編輯器(而不僅僅是第一行)。

+0

謝謝@LyndonHughey!完美的作品! –