mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-28 03:57:43 +02:00
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
|
using Xamarin.Forms;
|
|||
|
|
|||
|
namespace Bit.App.Effects
|
|||
|
{
|
|||
|
public enum ScrollContentInsetAdjustmentBehavior
|
|||
|
{
|
|||
|
Automatic,
|
|||
|
ScrollableAxes,
|
|||
|
Never,
|
|||
|
Always
|
|||
|
}
|
|||
|
|
|||
|
public class ScrollViewContentInsetAdjustmentBehaviorEffect : RoutingEffect
|
|||
|
{
|
|||
|
public static readonly BindableProperty ContentInsetAdjustmentBehaviorProperty =
|
|||
|
BindableProperty.CreateAttached("ContentInsetAdjustmentBehavior", typeof(ScrollContentInsetAdjustmentBehavior), typeof(ScrollViewContentInsetAdjustmentBehaviorEffect), ScrollContentInsetAdjustmentBehavior.Automatic);
|
|||
|
|
|||
|
public static ScrollContentInsetAdjustmentBehavior GetContentInsetAdjustmentBehavior(BindableObject view)
|
|||
|
{
|
|||
|
return (ScrollContentInsetAdjustmentBehavior)view.GetValue(ContentInsetAdjustmentBehaviorProperty);
|
|||
|
}
|
|||
|
|
|||
|
public static void SetContentInsetAdjustmentBehavior(BindableObject view, ScrollContentInsetAdjustmentBehavior value)
|
|||
|
{
|
|||
|
view.SetValue(ContentInsetAdjustmentBehaviorProperty, value);
|
|||
|
}
|
|||
|
|
|||
|
public ScrollViewContentInsetAdjustmentBehaviorEffect()
|
|||
|
: base($"Bitwarden.{nameof(ScrollViewContentInsetAdjustmentBehaviorEffect)}")
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|