示例#1
0
        public override void ConstructUI()
        {
            base.ConstructUI();

            dashboard  = new RelativeLayout();
            reportName = new Entry
            {
                AutomationId = "reportNameEntry",
                Style        = (Style)App.Current.Resources["underlinedEntry"],
                FontSize     = Device.OnPlatform(20, 14, 14),
            };

            reportTotal = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"]
            };
            status = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"]
            };

            submitButton = new Button
            {
                Style             = (Style)App.Current.Resources["borderedButton"],
                AutomationId      = "submitReportButton",
                Text              = "Submit Report",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            deleteButton = new Button
            {
                Style             = (Style)App.Current.Resources["borderedButton"],
                AutomationId      = "deleteReportButton",
                Text              = "Delete Report",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            editNameImage = new Image {
                AutomationId = "editNameButton", Aspect = Aspect.AspectFill
            };

            expenseList = new ExpenseListView {
                AutomationId = "expenseListView"
            };

            listHeader = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"]
            };
            expenseList.Header = new ContentView
            {
                Content = listHeader,
                Padding = new Thickness(10, 0, 0, 0)
            };

            addExpense = new ToolbarItem {
                AutomationId = "addExpenseButton", Text = "Add Expense"
            };

            layout = new StackLayout
            {
                Padding = new Thickness(0, 0, 0, 10),
            };
        }
示例#2
0
        public override void ConstructUI()
        {
            dashboard  = new RelativeLayout();
            reportName = new Entry
            {
                Style        = (Style)App.Current.Resources["underlinedEntry"],
                AutomationId = "reportNameEntry",
                FontSize     = 20,
                Placeholder  = "Report Name"
            };
            reportTotal = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"]
            };
            status = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"]
            };

            saveReportButton = new Button
            {
                Style             = (Style)App.Current.Resources["borderedButton"],
                AutomationId      = "saveReportButton",
                Text              = "Save Report",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            cancelReportButton = new Button
            {
                Style             = (Style)App.Current.Resources["borderedButton"],
                AutomationId      = "cancelButton",
                Text              = "Cancel",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };

            expenseList = new ExpenseListView {
                AutomationId = "expenseListView"
            };

            listHeader = new Label {
                Style = (Style)App.Current.Resources["whiteTextLabel"], Text = "Expenses"
            };
            expenseList.Header = new ContentView
            {
                Content = listHeader,
                Padding = new Thickness(10, 0, 0, 0)
            };

            addExpense = new ToolbarItem {
                AutomationId = "addExpense", Text = "Add Expense"
            };
        }