2016-06-29 06:44:47 +03:00
|
|
|
|
using System;
|
|
|
|
|
using Xamarin.Forms;
|
2016-05-18 04:28:19 +03:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Controls
|
|
|
|
|
{
|
|
|
|
|
public class ExtendedViewCell : ViewCell
|
|
|
|
|
{
|
|
|
|
|
public static readonly BindableProperty BackgroundColorProperty =
|
|
|
|
|
BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(ExtendedTextCell), Color.White);
|
|
|
|
|
|
2016-06-29 06:44:47 +03:00
|
|
|
|
public static readonly BindableProperty ShowDisclousureProperty =
|
|
|
|
|
BindableProperty.Create(nameof(DisclousureImage), typeof(bool), typeof(ExtendedTextCell), false);
|
|
|
|
|
|
|
|
|
|
public static readonly BindableProperty DisclousureImageProperty =
|
|
|
|
|
BindableProperty.Create(nameof(DisclousureImage), typeof(string), typeof(ExtendedTextCell), string.Empty);
|
|
|
|
|
|
2016-05-18 04:28:19 +03:00
|
|
|
|
public Color BackgroundColor
|
|
|
|
|
{
|
|
|
|
|
get { return (Color)GetValue(BackgroundColorProperty); }
|
|
|
|
|
set { SetValue(BackgroundColorProperty, value); }
|
|
|
|
|
}
|
2016-06-29 06:44:47 +03:00
|
|
|
|
|
|
|
|
|
public bool ShowDisclousure
|
|
|
|
|
{
|
|
|
|
|
get { return (bool)GetValue(ShowDisclousureProperty); }
|
|
|
|
|
set { SetValue(ShowDisclousureProperty, value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string DisclousureImage
|
|
|
|
|
{
|
|
|
|
|
get { return (string)GetValue(DisclousureImageProperty); }
|
|
|
|
|
set { SetValue(DisclousureImageProperty, value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public event EventHandler DisclousureTapped;
|
|
|
|
|
|
|
|
|
|
public void OnDisclousureTapped()
|
|
|
|
|
{
|
|
|
|
|
DisclousureTapped?.Invoke(this, EventArgs.Empty);
|
|
|
|
|
}
|
2016-05-18 04:28:19 +03:00
|
|
|
|
}
|
|
|
|
|
}
|