public MainPage(IMainPageViewModel mainPageViewModel) { ViewModel = mainPageViewModel; DataContext = mainPageViewModel; mainPageViewModel.MainPage = this; InitializeComponent(); }
// IMainPageViewModel viewModel ) /// <summary> /// Construrtor. /// </summary> /// <param name="viewModel"></param> public MainPage() { _viewModel = new MainPageViewModel(); //viewModel; DataContext = ViewModel; InitializeComponent(); }
/// <summary> /// Creates an instance of the MainPage class. /// </summary> public MainPage(IMainPageViewModel viewModel) { InitializeComponent(); //Assign the navigation, so the viewmodel can navigate between pages. viewModel.Navigation = this.Navigation; this.viewModel = viewModel; this.BindingContext = viewModel; }
public ShellViewModel(IMainPageViewModel mainPageViewModel, IScreen1ViewModel screen1ViewModel, IScreen2ViewModel screen2ViewModel, IEventAggregator eventAggregator, IWindowManager windowManager, ILogService logService) { _mainPageViewModel = mainPageViewModel; _screen1ViewModel = screen1ViewModel; _screen2ViewModel = screen2ViewModel; _eventAggregator = eventAggregator; _windowManager = windowManager; _logService = logService; }
public MainPage() { this.InitializeComponent(); if (ViewModel == null) { ViewModel = new MainPageViewModel(); } DataContext = ViewModel; }
private static void OnButtonClick(object sender, RoutedEventArgs e) { if (mainViewModel == null) { mainViewModel = Ioc.Resolve <IMainPageViewModel>(); mainViewModel.PropertyChanged += OnMainViewModelPropertyChanged; selectedFolderItemViewModel = mainViewModel.SelectedFolderItem; } UpdateMenu(); }
public MainPage(IMainPageViewModel viewModel, IFlagService flagService, IViewLocator viewLocator) { Title = "Currency Converter"; _viewModel = viewModel; SetViewModelEvents(); BindingContext = _viewModel; _flagService = flagService; _viewLocator = viewLocator; CreateUI(); this.SetDefaultPadding(); }
public Shell(IFaceDetectionService faceDetectionService, IFaceRecogntionService faceRecognitionService, IMainPageViewModel mainPageViewModel, IDatabaseService databaseService, IFileDirectoryService directoryService) { _faceDetectionService = faceDetectionService; _faceRecognionService = faceRecognitionService; _mainPageViewModel = mainPageViewModel; _databaseService = databaseService; _directoryService = directoryService; InitializeServices(); }
public MainPageController ( IMainPage mainPage, IMainPageViewModel mainPageViewModel, ILrpNavigation navigation, ICollectionMvcBuilder <Uom> uomMvcBuilder ) { _mainPage = mainPage ?? throw new ArgumentNullException(nameof(mainPage)); _mainPageViewModel = mainPageViewModel ?? throw new ArgumentNullException(nameof(mainPageViewModel)); _navigation = navigation ?? throw new ArgumentNullException(nameof(navigation)); _uomMvcBuilder = uomMvcBuilder ?? throw new ArgumentNullException(nameof(uomMvcBuilder)); WireController(); }
public NavigationMenuManager(IWorkbook workbook, ISynchronizationManager synchronizationManager, IMainPageViewModel viewModel) { if (workbook == null) { throw new ArgumentNullException("workbook"); } if (synchronizationManager == null) { throw new ArgumentNullException("synchronizationManager"); } if (viewModel == null) { throw new ArgumentNullException("viewModel"); } this.workbook = workbook; this.synchronizationManager = synchronizationManager; this.viewModel = viewModel; this.menuItems = this.viewModel.MenuItems; this.workbook.FolderAdded += this.OnFolderAdded; this.workbook.FolderRemoved += this.OnFolderRemoved; this.workbook.FoldersReordered += this.OnFolderReordered; this.workbook.SmartViewAdded += this.OnSmartViewAdded; this.workbook.SmartViewRemoved += this.OnSmartViewRemoved; this.workbook.SmartViewsReordered += this.OnSmartViewReordered; this.workbook.ContextAdded += this.OnContextAdded; this.workbook.ContextRemoved += this.OnContextRemoved; this.workbook.ContextsReordered += this.OnContextReordered; this.workbook.TagAdded += this.OnTagAdded; this.workbook.TagRemoved += this.OnTagRemoved; this.workbook.TagsReordered += this.OnTagReordered; foreach (var view in this.workbook.Views) { view.PropertyChanged += this.OnViewPropertyChanged; } this.workbook.ViewsReordered += this.OnViewsReordered; this.viewModel.MenuItems.CollectionChanged += this.OnMenuItemsCollectionChanged; }
public MainPage(IMainPageViewModel mainPageVM) { InitializeComponent(); DataContext = mainPageVM; }
public MainWindow(IMainPageViewModel context) { InitializeComponent(); DataContext = context.Get(); }
public MainPage(IMainPageViewModel inViewModel) { InitializeComponent(); viewModel = inViewModel; BindingContext = viewModel; }
public MainWindow(IMainPageViewModel viewModel) : this() { this.ViewModel = viewModel; }