CustomMenuItemCollection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / CustomMenuItemCollection.cs / 1 / CustomMenuItemCollection.cs

                            namespace System.Windows.Forms.Design { 
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.ComponentModel.Design; 
    using System.Design;
    using System.Diagnostics; 
    using System.Windows.Forms; 

    ///  
    /// 
    /// A strongly-typed collection that stores ToolStripMenuItem objects for DesignerContextMenu
    /// 
    internal class CustomMenuItemCollection : CollectionBase { 

        ///  
        ///  
        ///   Constructor
        ///  
        public CustomMenuItemCollection() {
        }

        ///  
        /// 
        ///    Add value to the collection 
        ///  
        public int Add(ToolStripItem value) {
            return List.Add(value); 
        }

        /// 
        ///  
        ///    Add range of values to the collection
        ///  
        public void AddRange(ToolStripItem[] value) { 
            for (int i = 0; (i < value.Length); i = (i + 1)) {
                this.Add(value[i]); 
            }
        }

        ///  
        ///    Abstract base class version for refreshing the items
        ///  
        public virtual void RefreshItems() 
        {
 
        }
    }
}
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

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