public CategoryPage(EntryPageViewModel viewModel, string selectedenvelope, string month)
        {
            InitializeComponent();
            BindingContext = viewModel;
            obj            = viewModel;//since viewModel has scope only inside constructor bit we need viewModel obj outside constructor as well

            listview.ItemsSource = viewModel.envelope;
            ToolbarItem item1 = new ToolbarItem
            {
                Text = selectedenvelope + "  Details",

                Priority = 0,
                Order    = ToolbarItemOrder.Primary
            };
            ToolbarItem item2 = new ToolbarItem
            {
                Text     = month,
                Priority = 0,
                Order    = ToolbarItemOrder.Primary
            };

            // "this" refers to a Page object
            ToolbarItems.Add(item1);
            ToolbarItems.Add(item2);
            // BindingContext = viewModel;

            // listview.ItemsSource = viewModel.envelope;
        }
        private async void CheckExpense()
        {
            var hasTransaction = File.Exists(App.transaction_filemane);

            if (!hasTransaction)
            {
                File.Create(App.transaction_filemane);
            }
            else
            {
                //read transactions
                EntryPageViewModel.ReadAllTransactions(viewModel.transactions, App.transaction_filemane);
                viewModel.UpdateExpenses(viewModel.expenses, viewModel.currentMonth, viewModel.transactions);
            }

            MonthPicker.SelectedIndex = viewModel.currentMonth - 1;
        }