Billing/Billing.Shared/Views/AddAccountPage.xaml
2022-02-26 17:29:12 +08:00

58 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ui:BillingPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:r="clr-namespace:Billing.Languages"
xmlns:ui="clr-namespace:Billing.UI"
xmlns:v="clr-namespace:Billing.Views"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Billing.Views.AddAccountPage"
x:Name="addAccountPage"
x:DataType="v:AddAccountPage"
Title="{r:Text AddAccount}"
BindingContext="{x:Reference addAccountPage}"
NavigationPage.BackButtonTitle="">
<ContentPage.Resources>
<ui:AccountCategoryConverter x:Key="categoryConverter"/>
<ui:MoneyConverter x:Key="moneyConverter" MarkVisible="False"/>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
<ToolbarItem Order="Primary" IconImageSource="check.png" Command="{Binding CheckAccount}"/>
</ContentPage.ToolbarItems>
<ContentPage.Content>
<TableView Intent="Settings" HasUnevenRows="True">
<TableSection Title=" ">
<ui:OptionEditorCell Title="{r:Text AccountName}" Height="120" FontSize="20"
Icon="pencil.png"
Text="{Binding AccountName, Mode=TwoWay}"
Keyboard="Text" Placeholder="{r:Text AccountNamePlaceholder}"/>
<ui:OptionImageCell Title="{r:Text Icon}" Height="44" Icon="face.png"
ImageSource="{Binding AccountIcon}"
Command="{Binding SelectIcon}"/>
<ui:OptionSelectCell Title="{r:Text Category}" Height="44" Icon="project.png"
Detail="{Binding Category, Converter={StaticResource categoryConverter}}"
Command="{Binding SelectCategory}"/>
</TableSection>
<TableSection>
<TableSection.Title>
<OnPlatform x:TypeArguments="x:String" Android=" "/>
</TableSection.Title>
<ui:OptionEntryCell Title="{r:Text Balance}" Height="44" Icon="sackdollar.png"
Text="{Binding Balance, Converter={StaticResource moneyConverter}}"
Keyboard="Numeric" Placeholder="{r:Text BalancePlaceholder}"
Unfocused="Balance_Unfocused"/>
<ui:OptionTextCell Title="{r:Text Currency}" Height="44" Icon="dollar.png"
Detail="{r:Text CNY}"/>
</TableSection>
<TableSection>
<TableSection.Title>
<OnPlatform x:TypeArguments="x:String" Android=" "/>
</TableSection.Title>
<ui:OptionEditorCell Title="{r:Text Memo}" Height="120" Icon="note.png"
Text="{Binding Memo, Mode=TwoWay}"
Keyboard="Plain" Placeholder="{r:Text MemoPlaceholder}"/>
</TableSection>
</TableView>
</ContentPage.Content>
</ui:BillingPage>