Beispiel #1
0
        private int GetIconOverlayIndex()
        {
            if (_iconOverlayIndex != UndefinedIconIndex)
            {
                return(_iconOverlayIndex);
            }
            if (IsDesktop)
            {
                return(_iconOverlayIndex = NoIconIndex);
            }

            Dispatcher.InvokeAsync(
                () => {
                int iconOverlayIndex;
                using (NativeShellIconOverlay shellIconOverlay = ParentShellFolder.QueryInterface <IShellIconOverlay>().ToNative())
                    iconOverlayIndex = shellIconOverlay != null ? _tree.IconList.GetIconOverlayIndex(shellIconOverlay, _pidl) : NoIconIndex;
                Set(ref _iconOverlayIndex, iconOverlayIndex, "IconOverlaySmall", "IconOverlayLarge", "IconOverlayExtraLarge", "IconOverlayJumbo");
            },
                DispatcherPriority.Background);
            return(NoIconIndex);
        }
 public ImageSource GetIconOverlay(NativeShellIconOverlay shellIconOverlay, PIDLIST pidl, SHIL iconSize)
 {
     return(GetIconByIndex(iconSize, GetIconOverlayIndex(shellIconOverlay, pidl)));
 }
 public int GetIconOverlayIndex(NativeShellIconOverlay shellIconOverlay, PIDLIST pidl)
 {
     return(shellIconOverlay.GetOverlayIconIndex(pidl));
 }