コード例 #1
0
        public void UpdateLastItem(int CurLocationCount)
        {
            BreadcrumbBarItem lastitem =
                elPanel.Children[elPanel.Children.Count - 1] as BreadcrumbBarItem;

            lastitem.SetChildren(CurLocationCount > 0);
        }
コード例 #2
0
        private void GetBreadCrumbItems(List <ShellObject> items)
        {
            ShellObject lastmanstanding = items[0];

            items.Reverse();

            foreach (ShellObject thing in items)
            {
                bool isSearch = false;
                try
                {
                    isSearch = thing.IsSearchFolder;
                }
                catch
                {
                    isSearch = false;
                }
                BreadcrumbBarItem duh = new BreadcrumbBarItem();
                if (!isSearch)
                {
                    duh.LoadDirectory(thing);
                }
                else
                {
                    thing.Thumbnail.FormatOption = ShellThumbnailFormatOption.IconOnly;
                    thing.Thumbnail.CurrentSize  = new Size(16, 16);
                    duh.pathName.Text            = thing.GetDisplayName(DisplayNameType.Default);
                    duh.PathImage.Source         = thing.Thumbnail.BitmapSource;
                    duh.MenuBorder.Visibility    = System.Windows.Visibility.Collapsed;
                    duh.grid1.Visibility         = System.Windows.Visibility.Collapsed;
                }

                duh.NavigateRequested    += new BreadcrumbBarItem.PathEventHandler(duh_NavigateRequested);
                duh.ContextMenuRequested += duh_ContextMenuRequested;

                this.elPanel.Children.Add(duh);

                if (thing == lastmanstanding)
                {
                    furthestrightitem = duh;
                    duh.BringIntoView();
                }
            }
        }
コード例 #3
0
        private void GetBreadCrumbItems(List<ShellObject> items)
        {
            ShellObject lastmanstanding = items[0];
            items.Reverse();
            

            foreach (ShellObject thing in items)
            {
                bool isSearch = false;
                try 
	            {
                    isSearch = thing.IsSearchFolder;
	            }
	            catch 
	            {
		            isSearch = false;
	            }
                BreadcrumbBarItem duh = new BreadcrumbBarItem();
                if (!isSearch)
                {
                    duh.LoadDirectory(thing);
                    
                }
                else
                {
                    thing.Thumbnail.FormatOption = ShellThumbnailFormatOption.IconOnly;
                    thing.Thumbnail.CurrentSize = new Size(16, 16);
                    duh.pathName.Text = thing.GetDisplayName(DisplayNameType.Default);
                    duh.PathImage.Source = thing.Thumbnail.BitmapSource;
                    duh.MenuBorder.Visibility = System.Windows.Visibility.Collapsed;
                    duh.grid1.Visibility = System.Windows.Visibility.Collapsed;
                    
                }

                
                
                duh.NavigateRequested += new BreadcrumbBarItem.PathEventHandler(duh_NavigateRequested);

                this.elPanel.Children.Add(duh);
                
                if (thing == lastmanstanding)
                {
                    furthestrightitem = duh;
                    duh.BringIntoView();
                }
               
            }
        }