DockingAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DockingAttribute.cs / 1305376 / DockingAttribute.cs

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

namespace System.Windows.Forms { 
 
    /// 
    ///  
    ///    
    ///       Specifies how a control should be docked by default when added through the designer.
    ///    
    ///  
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class DockingAttribute : Attribute { 
        private DockingBehavior dockingBehavior; 

        ///  
        /// 
        ///    
        ///       Default constructor.
        ///     
        /// 
        public DockingAttribute() { 
            this.dockingBehavior = DockingBehavior.Never; 
        }
 
        /// 
        /// 
        ///    
        ///       Constructor. 
        ///    
        ///  
        public DockingAttribute(DockingBehavior dockingBehavior) { 
            this.dockingBehavior = dockingBehavior;
        } 

        /// 
        /// 
        ///  
        ///    Specifies the default value for the .
        ///    This field is read-only. 
        ///  
        /// 
        public static readonly DockingAttribute Default = new DockingAttribute(); 

        /// 
        /// 
        ///     
        ///       DockingBehavior property.
        ///     
        ///  
        public DockingBehavior DockingBehavior {
            get { 
                return dockingBehavior;
            }
        }
 
        /// 
        ///  
        ///  
        /// 
        public override bool Equals(object obj) { 
            if (obj == this) {
                return true;
            }
 
            DockingAttribute other = obj as DockingAttribute;
 
            return (other != null) && other.DockingBehavior == this.dockingBehavior; 
        }
 
        /// 
        /// 
        ///    [To be supplied.]
        ///  
        public override int GetHashCode() {
            return dockingBehavior.GetHashCode(); 
        } 

        ///  
        /// 
        /// 
        /// 
        public override bool IsDefaultAttribute() { 
            return (this.Equals(Default));
        } 
    } 
}

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

namespace System.Windows.Forms { 
 
    /// 
    ///  
    ///    
    ///       Specifies how a control should be docked by default when added through the designer.
    ///    
    ///  
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class DockingAttribute : Attribute { 
        private DockingBehavior dockingBehavior; 

        ///  
        /// 
        ///    
        ///       Default constructor.
        ///     
        /// 
        public DockingAttribute() { 
            this.dockingBehavior = DockingBehavior.Never; 
        }
 
        /// 
        /// 
        ///    
        ///       Constructor. 
        ///    
        ///  
        public DockingAttribute(DockingBehavior dockingBehavior) { 
            this.dockingBehavior = dockingBehavior;
        } 

        /// 
        /// 
        ///  
        ///    Specifies the default value for the .
        ///    This field is read-only. 
        ///  
        /// 
        public static readonly DockingAttribute Default = new DockingAttribute(); 

        /// 
        /// 
        ///     
        ///       DockingBehavior property.
        ///     
        ///  
        public DockingBehavior DockingBehavior {
            get { 
                return dockingBehavior;
            }
        }
 
        /// 
        ///  
        ///  
        /// 
        public override bool Equals(object obj) { 
            if (obj == this) {
                return true;
            }
 
            DockingAttribute other = obj as DockingAttribute;
 
            return (other != null) && other.DockingBehavior == this.dockingBehavior; 
        }
 
        /// 
        /// 
        ///    [To be supplied.]
        ///  
        public override int GetHashCode() {
            return dockingBehavior.GetHashCode(); 
        } 

        ///  
        /// 
        /// 
        /// 
        public override bool IsDefaultAttribute() { 
            return (this.Equals(Default));
        } 
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

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