|
|
@ -23,9 +23,9 @@ public partial class InCellsPage : ContentPage
|
|
|
|
BindingContext = this;
|
|
|
|
BindingContext = this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DropGestureRecognizer_Drop(object sender, DropEventArgs e)
|
|
|
|
private void Cages_Drop(object sender, DropEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ((sender as Element)?.Parent.BindingContext is Cage receivingElement)
|
|
|
|
if ((sender as Element)?.BindingContext is Cage receivingElement)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (e.Data.Properties["value"] is Nounours draggedNounours)
|
|
|
|
if (e.Data.Properties["value"] is Nounours draggedNounours)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -36,19 +36,12 @@ public partial class InCellsPage : ContentPage
|
|
|
|
|
|
|
|
|
|
|
|
private void Bag_DragStarting(object sender, DragStartingEventArgs e)
|
|
|
|
private void Bag_DragStarting(object sender, DragStartingEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
e.Data.Properties["value"] = (sender as Element)?.Parent.BindingContext;
|
|
|
|
e.Data.Properties["value"] = (sender as Element)?.BindingContext;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void DropGestureRecognizer_DragLeave(object sender, DragEventArgs e)
|
|
|
|
private void Cages_DragStarting(object sender, DragStartingEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(e.Data.Properties["value"] is Nounours draggedNounours
|
|
|
|
e.Data.Properties["value"] = ((sender as Element)?.BindingContext as Cage)?.MyPrecious;
|
|
|
|
&& sender is Cage cage)
|
|
|
|
|
|
|
|
cage.MyPrecious = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void DragGestureRecognizer_DragStarting1(object sender, DragStartingEventArgs e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
e.Data.Properties["value"] = ((sender as Element)?.Parent.BindingContext as Cage)?.MyPrecious;
|
|
|
|
|
|
|
|
if((sender as Element)?.BindingContext is Cage cage)
|
|
|
|
if((sender as Element)?.BindingContext is Cage cage)
|
|
|
|
cage.MyPrecious = null;
|
|
|
|
cage.MyPrecious = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|