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

            DataContext =
                itemViewModel = ServiceContainer.Resolve<ItemViewModel> ();

            assignmentViewModel = ServiceContainer.Resolve<AssignmentViewModel> ();

            itemSearchText.TextChanged += (sender, e) => {
                itemViewModel.SearchText = itemSearchText.Text;
            };
        }
コード例 #2
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 ();
        }
コード例 #3
0
        public ItemsPage ()
        {
            this.InitializeComponent ();

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

            itemsListView.DataContext =
                itemsAddItem.DataContext =
                itemViewModel = ServiceContainer.Resolve<ItemViewModel> ();

            applicationBar.Closed += (sender, e) => {
                itemViewModel.SelectedItem = null;
                applicationBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            };

            Window.Current.SizeChanged += (sender, e) => {
                if (itemViewModel.ItemPopUp != null && itemViewModel.ItemPopUp.IsOpen) {
                    itemViewModel.ItemPopUp.SetValue (Canvas.LeftProperty, Window.Current.Bounds.Width - Constants.PopUpWidth);
                }
            };
        }