You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
4.4 KiB
80 lines
4.4 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="DragNDrop.ExchangeNounoursPage"
|
|
Title="ExchangeNounoursPage">
|
|
<ScrollView Padding="20">
|
|
<VerticalStackLayout Spacing="20">
|
|
<Label Text="Demo 3: exchange Nounours between collections" FontSize="Title" HorizontalOptions="Center"
|
|
FontAttributes="Bold"/>
|
|
<Label Text="Drag and drop nounours from one collection to another." LineBreakMode="WordWrap"/>
|
|
<Border Stroke="DarkSalmon"
|
|
StrokeThickness="4" VerticalOptions="Center">
|
|
<Border.StrokeShape>
|
|
<RoundRectangle CornerRadius="60"/>
|
|
</Border.StrokeShape>
|
|
<FlexLayout BindableLayout.ItemsSource="{Binding FirstCollection}" MinimumHeightRequest="128"
|
|
AlignItems="Center" Wrap="Wrap">
|
|
<FlexLayout.GestureRecognizers>
|
|
<DropGestureRecognizer Drop="OnDrop" />
|
|
</FlexLayout.GestureRecognizers>
|
|
<BindableLayout.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Grid.RowSpan="3"
|
|
WidthRequest="120" HeightRequest="120"
|
|
Padding="0" Margin="4"
|
|
Stroke="DarkSalmon"
|
|
StrokeThickness="4">
|
|
<Border.StrokeShape>
|
|
<RoundRectangle CornerRadius="60"/>
|
|
</Border.StrokeShape>
|
|
<Border.Shadow>
|
|
<Shadow Brush="DarkSalmon" Offset="3, 4"
|
|
Radius="10" Opacity="0.8"/>
|
|
</Border.Shadow>
|
|
<Border.GestureRecognizers>
|
|
<DragGestureRecognizer DragStarting="OnDragStarting"/>
|
|
</Border.GestureRecognizers>
|
|
<Image Source="{Binding Image}"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</BindableLayout.ItemTemplate>
|
|
</FlexLayout>
|
|
</Border>
|
|
|
|
<Border Stroke="DarkSalmon"
|
|
StrokeThickness="4" VerticalOptions="Center">
|
|
<Border.StrokeShape>
|
|
<RoundRectangle CornerRadius="60"/>
|
|
</Border.StrokeShape>
|
|
<FlexLayout BindableLayout.ItemsSource="{Binding SecondCollection}" MinimumHeightRequest="128"
|
|
AlignItems="Center" Wrap="Wrap">
|
|
<FlexLayout.GestureRecognizers>
|
|
<DropGestureRecognizer Drop="OnDrop" />
|
|
</FlexLayout.GestureRecognizers>
|
|
<BindableLayout.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Grid.RowSpan="3"
|
|
WidthRequest="120" HeightRequest="120"
|
|
Padding="0" Margin="4"
|
|
Stroke="DarkSalmon"
|
|
StrokeThickness="4">
|
|
<Border.StrokeShape>
|
|
<RoundRectangle CornerRadius="60"/>
|
|
</Border.StrokeShape>
|
|
<Border.Shadow>
|
|
<Shadow Brush="DarkSalmon" Offset="3, 4"
|
|
Radius="10" Opacity="0.8"/>
|
|
</Border.Shadow>
|
|
<Border.GestureRecognizers>
|
|
<DragGestureRecognizer DragStarting="OnDragStarting"/>
|
|
</Border.GestureRecognizers>
|
|
<Image Source="{Binding Image}"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</BindableLayout.ItemTemplate>
|
|
</FlexLayout>
|
|
</Border>
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</ContentPage> |