public Filler(Action callback = null)
{
// create the layout
_layout = new StackLayout
{
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center,
Orientation = StackOrientation.Horizontal,
Padding = new Thickness(0, 0, 5, 0),
WidthRequest = Definitions.HeaderHeight,
};
// create the label
_image = new Image
{
Source = "Resources/add.png",
Opacity = 0,
};
_layout.Children.Add(_image);
// add a gester reco
this.GestureRecognizers.Add(new TapGestureRecognizer
{
Command = new Command(async (o) =>
{
await this.ScaleTo(0.95, 50, Easing.CubicOut);
await this.ScaleTo(1, 50, Easing.CubicIn);
if (callback != null)
callback.Invoke();
})
});
// set the content
this.Content = _layout;
}