Adding Auto Format for ASP.NET Custom Controls Design Time

by Amr 2/25/2008 11:58:00 PM

Back to design time support, but this time with ASP.NET server controls, most complex & simple controls built in the .NET framework are associated with an Auto Format.. link in the smart tag as the one shown in the figure, I showed in a previous post how to add links and properties to the smart tag of a control.

autoLink  More...

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Design Time Support

Extracting Icons from Files

by Amr 2/22/2008 12:25:00 AM

Have you ever seen a file with a pretty icon you wanted to use but you couldn't get a similar one in your program?
If yes,  try this method >> Icon.ExtractAssociatedIcon here is the code I wrote that works fine, you will also find the sample attached

Icon ico;

public Form1()
{
  InitializeComponent();
  ico = this.Icon;
}

private void btnGetIcon_Click(object sender, EventArgs e)
{
  if(dlgOpen.ShowDialog() == DialogResult.OK)
  {
    ico = Icon.ExtractAssociatedIcon(dlgOpen.FileName);
    this.Icon = ico;
    pnlIcon.Invalidate();
  }
}

private void pnlIcon_Paint(object sender, PaintEventArgs e)
{
  e.Graphics.DrawIcon(ico, pnlIcon.ClientRectangle);
}

IconExtractor.zip (7.03 kb)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Windows Forms

Exploring GDI+ : Using The Brush

by Amr 2/15/2008 5:01:00 PM

Brush HierarchyOne of the core classes in the GDI+ framework built in .Net is the Brush class. There are 5 types of Brushes in .Net that help you to color your objects by lot of variations the five types are as shown in the figure :

 

More...

Currently rated 5.0 by 5 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

GDI+

The ASP.NET Configuration Model

by Amr 2/14/2008 8:20:00 PM

ASP.NET as well as .NET applications have one more excellent feature, ASP.NET uses a flexible configuration management system that keeps the application configuration separate from application code. ASP.NET configuration is stored in XML files with the .config extension, which makes it easy for users to change it before, during and after deployment.

The configuration file we all are aware of is the web.config file found in the application root, which when added has almost very simple configurations. But guess what that is not the only configuration file that your ASP.NET application relies on, there are other config files that your application inherit that configuration by default, next I will show the Configuration Hierarchy in ASP.NET. More...

Currently rated 4.6 by 5 people

  • Currently 4.6/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

ASP.NET

Custom Controls Design Time Support Part 15: Debugging Design Time

by Amr 2/12/2008 10:16:00 PM

This is final part of my series/tutorial on design time support, it was really fun writing it and hearing your comments and suggestions, I really learnt alot and hope you too had some experience in writing design time support for the custom controls.

In this part, I will show you how to debug the design time code we are writing (works with vs 2005 and 2008).

More...

Currently rated 4.3 by 9 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Design Time Support

Custom Controls Design Time Support Part 14: Extra Property Tab

by Amr 2/8/2008 6:19:00 PM

The default PropetryWindow in the visual studio shows 2 Tabs one for properties and another for events. If one day you thought that you have set of members might be Properties that you need to put them in an extra property tab then in this post you will learn how to put extra tabs.

When this can be useful?

After the ajax era has arrived and component authors started to build some ajax controls we usually see Properties named " ClientXXX " where xxx is the event name and these properties just appear in the properties tab while it would be more appropriate to show them in an extra tab say a Client side events.  More...

Currently rated 5.0 by 4 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Design Time Support

Custom Controls Design Time Support Part 13: Adding Snaplines

by Amr 2/4/2008 9:56:00 PM

Another new feature added in the Design Time Environment in visual studio 2005 and 2008 for windows forms and windows user controls designers is the Snaplines.

What is a snapline?

A snapline is a dynamically generated UI layout guide line. Snaplines are generated during control move operations in the designer. The location of other controls on the design surface provide the lines.

All controls by default inherit the default the Snaplines which appear while moving that interact with Tops, Lefts, Bottoms and Rights of other controls, with the form border, spacings from other controls and some other. One remarkable snapline is the one that appears while moving a Label control beside TextBox controls the purple snapline that aligns the text position instead of the control position. More...

Currently rated 5.0 by 5 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Design Time Support

Custom Controls Design Time Support Part 12: Adding SmartTag

by Amr 2/2/2008 8:15:00 AM
One more advantage you get from building a custom designer for your custom controls is that you can add smart tag panel to add important most used properties and methods.

What is a Smart Tag?

aa

SmartTag is one of the new enhancement of VisualStudio 2005 design time and VS 2008 as well. Smart tags are menu-like user interface (UI) elements that supply commonly used design-time options. Most of the standard components and controls provided with the .NET Framework contain smart tag and designer verb enhancements. More...

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Design Time Support

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Amr Elsehemy Amr Elsehemy
MCSD, MCTS Sql 2005 E-mail me Send mail

Calendar

<<  May 2008  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Creative Commons
Sign in

Sitemeter