Click here to Skip to main content
15,897,226 members
Articles / Programming Languages / C#

AquaButton: A Sample Custom Button Control with a Mac OS X Look

Rate me:
Please Sign up or sign in to vote.
4.65/5 (54 votes)
11 Sep 20027 min read 463.8K   5.3K   204  
Sample custom button control to help you write your own custom controls
//
// AquaButtonDesigner.cs  by David Peckham
///
///		 by Dave Peckham
///		 Irvine, California
///		 August 20, 2002
///	
// Remove a few properties that our button doesn't support (yet).
//

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;


namespace Wildgrape.Aqua.Controls
{
	public class ButtonDesigner : System.Windows.Forms.Design.ControlDesigner {
	
		public ButtonDesigner()
		{
		}

		//Overrides

		/// <summary>
		/// Remove Button and Control properties that are 
		/// not supported by the Aqua Button
		/// </summary>
		/// <param name="Properties"></param>
		protected override void PostFilterProperties( IDictionary Properties )
		{
			Properties.Remove( "AllowDrop" );
			Properties.Remove( "BackColor" );
			Properties.Remove( "BackgroundImage" );
			Properties.Remove( "ContextMenu" );
			Properties.Remove( "FlatStyle" );
			Properties.Remove( "ForeColor" );
			Properties.Remove( "Image" );
			Properties.Remove( "ImageAlign" );
			Properties.Remove( "ImageIndex" );
			Properties.Remove( "ImageList" );
			Properties.Remove( "Size" );
			Properties.Remove( "TextAlign" );
		}
	}
}

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.


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions