Issue
I have an Editor control inside ListView. If the text is larger than Editor height, I want to be able to scroll the Editor without clicking inside the Editor. But ListView scroll only working, Editor scroll not working.
<ListView
x:Name="listProjects"
HasUnevenRows="true"
SeparatorVisibility="None"
ItemsSource="{Binding Feedbacks}"
HorizontalOptions="FillAndExpand"
ItemTapped="Handle_ItemTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="15,15,15,15" BackgroundColor="Transparent">
<Editor HeightRequest="50" FontSize="Small"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Solution
You can use a ScrollView
to wrap the Editor
like following code.
<ScrollView HeightRequest="50">
<Editor Text="22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" ></Editor>
</ScrollView>
Here is running GIF.
And please update Xamarin forms nuget packages to 4.7.0.1179
or later.
Answered By - Leon Lu - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.