Click here to Skip to main content
15,886,810 members
Articles / Desktop Programming / Windows Forms

ButtonBar Control using .NET

Rate me:
Please Sign up or sign in to vote.
4.95/5 (43 votes)
3 Dec 2009CPOL5 min read 64.5K   5.5K   104  
Themed ButtonBar control supporting custom draw with full Designer support
using System;

namespace ButtonBarsControl.Design.Attributes
{
    /// <summary>
    /// Indicates Image property for indexing. e.g. If parent contains image list use "Parent.ImageList".
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    internal sealed class ImagePropertyAttribute : Attribute
    {
        private readonly string propertyName;

        /// <summary>
        /// Crate instance of the <see cref="ImagePropertyAttribute"/>
        /// </summary>
        /// <param name="relatedImageList"></param>
        public ImagePropertyAttribute(string relatedImageList)
        {
            propertyName = relatedImageList;
        }

        /// <summary>
        /// Gets the name of the property which is to be used for imagelist.
        /// </summary>
        public string PropertyName
        {
            get { return propertyName; }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions