private void OnNavigateCommand(TreeViewItemCommandContext context)
        {
            var folder = (FolderViewModel)context.Item;

            if (folder.Emails.Count > 0)
            {
                var navigationService = DependencyService.Get <INavigationService>();

                navigationService.NavigateToAsync <DetailsViewModel>(folder);
            }
        }
        private void OnActivateCommand(TreeViewItemCommandContext context)
        {
            if (this.Folder != null)
            {
                this.Folder.IsActive = false;
            }

            var folder = (FolderViewModel)context.Item;

            if (this.Folder != folder && folder.Parent != null)
            {
                this.Folder          = folder;
                this.Folder.IsActive = true;
            }
            else
            {
                this.Folder = null;
            }
        }
Example #3
0
        private void OnCollapseCommand(TreeViewItemCommandContext context)
        {
            var folder = (FolderViewModel)context.Item;

            folder.Icon = ClosedFolderIcon;
        }
Example #4
0
        private void OnExpandCommand(TreeViewItemCommandContext context)
        {
            var folder = (FolderViewModel)context.Item;

            folder.Icon = OpenFolderIcon;
        }