Начинаю вникать в xamarin. Решил написать простенький проект а-ля заметочника. Делаю все по паттерну MVVM. Проблема следующая: нужно разместить 2 списка, слева и справа, они разных размеров, и не зависимы друг от друга, вот пока сделал примерно так:
Но суть в том, что ListView имеет в себе свой scroll, и я без понятия как его можно отключить.. наваял вообще так:
<?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="Diary.Views.NotesListPage">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="iOS" Value="10, 20, 10, 0" />
<On Platform="Android" Value="10, 0" />
</OnPlatform>
</ContentPage.Padding>
<StackLayout>
<Button Text="Добавить" Command="{Binding CreateNoteCommand}" />
<ScrollView>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ListView x:Name="NoteListLeft" ItemsSource="{Binding NotesLeft}"
SelectedItem="{Binding SelectedNote, Mode=TwoWay}" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ContentView Padding="5">
<Frame OutlineColor="Black"
Padding="10">
<StackLayout Orientation="Horizontal">
<!--<BoxView Color="{Binding Color}"
WidthRequest="50"
HeightRequest="50" />-->
<StackLayout>
<Label Text="{Binding Title}" FontAttributes="Bold" FontSize="Medium" />
<Label Text="{Binding Message}" FontSize="Small" />
</StackLayout>
</StackLayout>
</Frame>
</ContentView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView Grid.Column="1" x:Name="NoteListRight" ItemsSource="{Binding NotesRight}"
SelectedItem="{Binding SelectedNote, Mode=TwoWay}" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ContentView Padding="5">
<Frame OutlineColor="Black"
Padding="10">
<StackLayout Orientation="Horizontal">
<!--<BoxView Color="{Binding Color}"
WidthRequest="50"
HeightRequest="50" />-->
<StackLayout>
<Label Text="{Binding Title}" FontAttributes="Bold" FontSize="Medium" />
<Label Text="{Binding Message}" FontSize="Small" />
</StackLayout>
</StackLayout>
</Frame>
</ContentView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</ScrollView>
</StackLayout>
</ContentPage>