add account

This commit is contained in:
2022-02-26 12:36:32 +08:00
parent fae6d2ce50
commit 4d69bea70b
12 changed files with 192 additions and 23 deletions

View File

@ -186,6 +186,49 @@ namespace Billing.UI
};
}
public class OptionImageCell : OptionSelectCell
{
public static readonly BindableProperty ImageSourceProperty = BindableProperty.Create(nameof(ImageSource), typeof(ImageSource), typeof(OptionImageCell));
[TypeConverter(typeof(ImageSourceConverter))]
public ImageSource ImageSource
{
get => (ImageSource)GetValue(ImageSourceProperty);
set => SetValue(ImageSourceProperty, value);
}
protected override View Content => new StackLayout
{
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.End,
Children =
{
new Image
{
HeightRequest = 20,
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center,
Margin = new Thickness(6, 0)
}
.Binding(Image.SourceProperty, nameof(ImageSource)),
new TintImage
{
HeightRequest = 20,
VerticalOptions = LayoutOptions.Center,
Margin = new Thickness(6, 0),
Source = "right.png"
}
},
GestureRecognizers =
{
new TapGestureRecognizer()
.Binding(TapGestureRecognizer.CommandProperty, nameof(Command))
.Binding(TapGestureRecognizer.CommandParameterProperty, nameof(CommandParameter))
}
};
}
public class OptionSwitchCell : OptionCell
{
public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(OptionSwitchCell));