add account page detail

This commit is contained in:
2022-02-28 17:32:40 +08:00
parent 283acf7d35
commit 589c7514f2
17 changed files with 307 additions and 56 deletions

View File

@ -0,0 +1,51 @@
using Billing.Themes;
using System.Collections;
using Xamarin.Forms;
namespace Billing.UI
{
public class ItemSelectPage : ContentPage
{
public ItemSelectPage(IList source)
{
Content = new ListView
{
ItemsSource = source,
ItemTemplate = new DataTemplate(() => new StackLayout
{
Orientation = StackOrientation.Horizontal,
Padding = new Thickness(20, 0),
Spacing = 10,
Children =
{
new Image
{
WidthRequest = 22,
HeightRequest = 22,
Aspect = Aspect.AspectFit,
VerticalOptions = LayoutOptions.Center
}
.Binding(Image.SourceProperty, "Icon"),
new Label
{
VerticalOptions = LayoutOptions.Center,
LineBreakMode = LineBreakMode.TailTruncation
}
.Binding(Label.TextProperty, "Name")
.DynamicResource(Label.TextColorProperty, BaseTheme.TextColor)
}
})
}
.DynamicResource(BackgroundColorProperty, BaseTheme.WindowBackgroundColor);
}
}
public class SelectItem<T>
{
public string Icon { get; set; }
public T Value { get; set; }
public string Name { get; set; }
}
}