Visual C# Express - Using the Properties Window
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| Visual C# Express: Using the Properties Window |
The Properties Window is used for configuring properties and events on controls in your user interface. For example to see a list of the properties of a form, visit the 70-526 section to Configure a Windows Form. Properties specify an object’s attributes, such as the name, text and color of a control object, without writing code.
At the top of of the properties window is a drop down listbox which displays the currently selected object or objects. Only objects from the active designer are visible. This allows any component within the designer to be selected.
Underneath the drop down listbox are a set of five icons. The first icon sorts the properties into a Categorized view. The categories are accessibility, appearance, behavior, data, design, focus, layout, miscellaneous and windows style. The second icon sorts the properties into an Alphabetic view.
The third icon switches the display to show the properties when the events are viewed. The fourth icon switches the display to show the associated events of the control.
The left column of the Properties window shows the properties of the control (the properties of a form are shown in Figure 16) while the right column displays the associated current value of the property.
Figure 16: Visual C# Express - The properties Window
Setting a property
Most properties contain either a number, a string or a value from a drop down list. This makes the developers job easier as each property will have a default value indicating what type it is. To set a property, simply select the right hand box and enter a suitable value.
Creating an event
To create an event, simply double-click on the event in the left column. This will create a method to implement the event and open the code window at the appropriate place.
MSDN references
|

