ImageListUtils.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Misc / ImageListUtils.cs / 1305376 / ImageListUtils.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

/* 
 */ 
namespace System.Windows.Forms {
    using System; 
    using System.ComponentModel;
    using System.Diagnostics;

    // Miscellaneous utilities 
    static internal class ImageListUtils {
 
        public static PropertyDescriptor GetImageListProperty(PropertyDescriptor currentComponent, ref object instance) { 
            if(instance is object[]) //multiple selection is not supported by this class
                return null; 

            PropertyDescriptor imageListProp = null;
            object parentInstance = instance;
 
            RelatedImageListAttribute relILAttr = currentComponent.Attributes[typeof(RelatedImageListAttribute)] as RelatedImageListAttribute;
            if (relILAttr != null) 
            { 
                string[] pathInfo = relILAttr.RelatedImageList.Split('.');
                for(int i=0;i

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK