2
が、これは私のXAMLです:Xamarinフォームプログラムでリストビューの高さを拡張
<?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="SetYourBudget.HomePage">
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<Label x:Name="lblImporto" Text="" VerticalOptions="Start" HorizontalOptions="Fill" HorizontalTextAlignment="Center"/>
<ListView VerticalOptions="FillAndExpand" x:Name ="list">
</ListView>
<StackLayout Orientation="Vertical" Spacing="5" VerticalOptions="EndAndExpand" BackgroundColor="#c1c1c1" x:Name="addLayout" Padding="10">
//I remove thrash code
</StackLayout>
</StackLayout>
</ContentPage>
私はそれの内側StackLayout
の大きさのために、下にスクロールして、プログラムで私のaddLayout
をアニメーション化しています。これは、コードであり、それは完璧に働いて、彼は下にスクロールして元の位置にまですることができます今すぐ
private async void BtnDropDown_Tapped(object sender, EventArgs e)
{
if (isVisible)
{
// hide
// addSection is a section of the addLayout, not relevant in the operation it's only the size i need to scroll
await addLayout.TranslateTo(0, addSection.Height + 10);
imgDropDown.Source = Device.OnPlatform("btnMostra", "btnMostra", "btnMostra");
isVisible= false;
}
else
{
//show
await addLayout.TranslateTo(0, 0);
imgDropDown.Source = Device.OnPlatform("btnNascondi", "btnNascondi", "btnNascondi");
isVisible= true;
}
}
、私の問題は、以下の通りです:あなたは、XAMLで見ることができるように、私はlist
た名前のListView
を持っていますレイアウトが下にスクロールしています。
下のレイアウトをスクロールするときに、スクロールアニメーションによって解放されたサイズを満たすようにリストを「拡大」します。
私はexplicative画像を投稿:
(私はいくつかのランダム件のデータが、それは単なるテキストですカウスセットOBVが私の目標はただリサイズ理解されています。)
おかげで、すべて、私のいないため申し訳ありませんが完璧な英語
でしたよあなたはこの問題を理解することができました、私は同じ問題を抱えています。 –
@PrakashChennupati unfortunatly not。最終的に私たちはクロスプラットフォームを使用するのではなく、ネイティブの解決策をとることに決めました。おそらく[このリンク](https://developer.xamarin.com/guides/xamarin-forms/user-interface/listview/)はあなたを助けてくれるかもしれませんが、この問題を解決できないのは残念です! –