Dave Sexton's Blog

on software development using C# and the Microsoft .NET Framework
Welcome to Dave Sexton's Blog Sign in | Join | Help

Designer Layout Regions Snippet

File Details
Downloads: 567 File Size: 1.3kB
Posted By: Dave Sexton Views: 1425
Date Added: Mon, Mar 19 2007

My snippets are provided "as is", with no warranty of any kind, either express or implied.  Use at your own risk.

Creates several #region blocks for the placement of specific code elements from within the body of a class definition created by a designer.

Shortcut: layoutd

For more information on my C# Code Snippets see my blog entry: Custom C# Code Snippets.  All of my snippets may be downloaded at once here.

Usage

This snippet is intended to be used as expansion or surrounds with from within the body of a class, struct or interface definition. Using this snippet for a struct or interface requires manual deletion of some of the regions that do not apply. The same goes for regions that do not apply to a particular class definition.

Example Output

The following code illustrates this snippet's output when it's executed for expansion from within the body of the Person class:

class Person
{
  #region Public Properties
  #endregion

  #region Private / Protected
  | {text cursor goes here}
  #endregion

  #region Constructors
  /// <summary>
  /// Constructs a new instance of the <see cref="Person" /> class.
  /// </summary>
  public Person()
  {
    InitializeComponent();
  }
  #endregion

  #region Methods
  {surrounds selection here}
  #endregion

  #region Events
  #endregion

  #region Event Handlers
  #endregion

  #region Nested
  #endregion
}

Filed under: , , ,
Comments
No comments exist for this file.

Add Comment

Name (required)
Web Site (optional)
Comment (required)
Add
Powered by Community Server (Personal Edition), by Telligent Systems