コード例 #1
0
        public AddExpenseFlyoutPanel ()
        {
            this.InitializeComponent ();

            DataContext =
                expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel> ();
        }
コード例 #2
0
        public ExpensesPage ()
        {
            this.InitializeComponent ();

            DataContext =    
                assignmentControl.DataContext =
                assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();

            expensesListView.DataContext =
                expensesAddExpense.DataContext =
                expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel> ();

            Window.Current.SizeChanged += (sender, e) => {
                if (expenseViewModel.ExpensePopUp != null && expenseViewModel.ExpensePopUp.IsOpen) {
                    expenseViewModel.ExpensePopUp.SetValue (Canvas.LeftProperty, Window.Current.Bounds.Width - Constants.PopUpWidth);
                }
            };
        }
コード例 #3
0
        public AssignmentPage ()
        {
            this.InitializeComponent ();

            DataContext =
                assignmentControl.DataContext =
                assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();
            
            itemViewModel = ServiceContainer.Resolve<ItemViewModel> ();
            
            laborViewModel = ServiceContainer.Resolve<LaborViewModel> ();
            
            photoViewModel = ServiceContainer.Resolve<PhotoViewModel> ();
            
            expenseViewModel = ServiceContainer.Resolve<ExpenseViewModel> ();
            
            documentViewModel = ServiceContainer.Resolve<DocumentViewModel> ();
            
            historyViewModel = ServiceContainer.Resolve<HistoryViewModel> ();

            picker = new MediaPicker ();
        }