public MainViewModel(Action onClose, IWindowFactory windowFactory, IPageFactory pageFactory) : base(onClose)
        {
            // Deletes existing database and seeds it with predefined data
            DataSeeder dataSeeder = new DataSeeder();

            dataSeeder.SeedAll();

            // Window services.
            _windowFactory = windowFactory;
            _pageFactory   = pageFactory;

            // Setup quotation page view
            QuotationPage         = _pageFactory.GetNewPageInstanceAsObject(PageType.QuotationPageView);
            _quotationPageService = _pageFactory.GetPageService(QuotationPage);

            // Setup customer page view
            CustomerPage         = _pageFactory.GetNewPageInstanceAsObject(PageType.CustomerPageView);
            _customerPageService = _pageFactory.GetPageService(CustomerPage);

            // Setup item page view
            ItemPage          = _pageFactory.GetNewPageInstanceAsObject(PageType.ItemPageView);
            _itemsPageService = _pageFactory.GetPageService(ItemPage);

            // Setup template page view
            TemplatePage         = _pageFactory.GetNewPageInstanceAsObject(PageType.TemplatePageView);
            _templatePageService = _pageFactory.GetPageService(TemplatePage);

            SelectedTabIndex = 0;
        }