public TablesPage()
        {
            InitializeComponent();
            BindingContext = vm = new TablesViewModel(Navigation, UserDialogs.Instance, this);

            if (Device.RuntimePlatform != Device.iOS)
            {
                tbiAddTable.Icon = "toolbar_new.png";
            }

            tbiAddTable.Command = new Command(async() =>
            {
                if (vm.IsBusy)
                {
                    return;
                }
                if (!vm.StorageAccountsExist)
                {
                    return;
                }
                App.Logger.TrackPage(AppPage.NewTable.ToString());
                var page = new NewTablePopup(vm);
                await PopupNavigation.PushAsync(page);
            });


            lvTables.ItemSelected += (sender, e) =>
            {
                lvTables.SelectedItem = null;
            };
        }
        public NewTableViewModel(INavigation navigation, IUserDialogs userDialogs, TablesViewModel tablesVM) : base(navigation, userDialogs)
        {
            this.tablesVM = tablesVM;
            var realm           = App.GetRealm();
            var storageAccounts = realm.All <StorageAccountExt>().Where(sa => sa.IsStorageAccountOn);

            StorageAccounts.ReplaceRange(storageAccounts);
        }
 public NewTablePopup(TablesViewModel tablesVM)
 {
     InitializeComponent();
     BindingContext = vm = new NewTableViewModel(Navigation, UserDialogs.Instance, tablesVM);
 }