Question: I am learning xamarin.forms technology.What mean by title is that I want to make sliding information box (from bottom, left or right side of the screen). Everything should be in the bottom of the page/view. Also placing in bottom something in xamarin.forms is also petty tricky.

[![Slides](https://i.stack.imgur.com/HwNzD.png)](https://i.stack.imgur.com/HwNzD.png)

I want to do this instead of dialog, because I dont want to feeze ui when alert dialog pop and i dont want force an user to click anything

Could you guys show me how can I do that?

Answer: 
You should use AbsoluteLayout for this, there goes an example:

```
// ContentPage:

var layout = new StackLayout {
 // you page content
};

Content = new NotifyLayoutView(layout);

```

And view class:

```
public class NotifyLayoutView : AbsoluteLayout
{
   public NotifyLayoutView(View content)
   {
        var flash = new StackLayout
        {
            BackgroundColor = Color.Red,
            HorizontalOptions = LayoutOptions.FillAndExpand,
            Children = {
               new Label { Text = "My notification" }
            }
        };

        SetLayoutFlags(content, AbsoluteLayoutFlags.All);
        SetLayoutBounds(content, new Rectangle(0f, 0f, 1f, 1f));
        SetLayoutFlags(flash, AbsoluteLayoutFlags.WidthProportional | 
        AbsoluteLayoutFlags.PositionProportional);
        SetLayoutBounds(flash, new Rectangle(0.5, 0.99, 0.95, AutoSize));
        Children.Add(content);
        Children.Add(flash);
   }
}

```

To change flash visibility you can use:

```
// open
await flash.ScaleTo(1.0f, 100);
await flash.FadeTo(1.0f, 100);

// hide
await layout.ScaleTo(0.0f);
await layout.FadeTo(0.0f);

```
Rather than going to any nuget packages. you can create it by yourself so that you can have control over it.
Use PanGesture and TranslateTo method and Relative layout with constraints to create it.

```
void PanGestureRecognizer_PanUpdated(System.Object sender, Xamarin.Forms.PanUpdatedEventArgs e)
{
y = e.TotalY;
switch (e.StatusType)
{
case GestureStatus.Started:
break;
case GestureStatus.Canceled:
break;
case GestureStatus.Running:
if ((y >= 5 || y <= -5) && !IsTurnY)
{
IsTurnY = true;
}
if (IsTurnY)
{
if (y <= valueY)
{
//iOS devices has top and bottom insets so the value is changed accordingly.
//get the top and bottom insets and adjst the values accordingly for bottom sheet to work correct in real devices
double valueToDeduct = 180;
//upwards dragged
if ((currentY + (-1 * y)) < (App.screenHeight — valueToDeduct))
{
BottomSheet.TranslateTo(BottomSheet.X, -(currentY + (-1 * y)));
currentY = currentY — y;
//Task.Delay(200);
}
else
{
//to avoid the bottomsheet go beyond the device height
BottomSheet.TranslateTo(BottomSheet.X, -(App.screenHeight — valueToDeduct));
currentY = (App.screenHeight — valueToDeduct);
}
}
if (y >= valueY)
{
//downwards dragged
if ((currentY — y) > 0)
{
BottomSheet.TranslateTo(BottomSheet.X, -(currentY — y));
currentY = currentY — y;
//Task.Delay(200);
}
else
{
//to avoid bottomsheet to hide below the screen height
BottomSheet.TranslateTo(BottomSheet.X, -0);
currentY = 0;
}
}
}
}
break;
case GestureStatus.Completed:
//store the translation applied during the pan
valueY = y;
IsTurnY = false;
break;
}
}

```

Here is the resource you can refer it, 

<https://youtu.be/zIIoCJ2r7xs>