コード例 #1
0
        private void OnNavigateCommand(TreeViewItemCommandContext context)
        {
            var folder = (FolderViewModel)context.Item;

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

                navigationService.NavigateToAsync <DetailsViewModel>(folder);
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        private void OnCollapseCommand(TreeViewItemCommandContext context)
        {
            var folder = (FolderViewModel)context.Item;

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

            folder.Icon = OpenFolderIcon;
        }