In this article, the topics like what are the properties that each control have and How to set properties for controls can be explained.It is very important to know about properties for each and every control. If known about control and its properties, it becomes an idea about control's functionality.
Before learning about properties, first of all, know about properties window. It automatically comes after creating the windows application. If it's not opened by default, press f4 to open the properties window. Below figure shows how properties window looks like.
Property
Description
Property is a feature that the control should have. The property is used to know about "what is that control and in how many ways we can use that control". All the properties of a control reside in the properties window. Every control has its own properties. Even Windows Form also have some properties.
Getting Properties Window
Description
Whenever, if one select that control, get the properties for the control and can select any control, automatically properties of that control will be open in a properties window.
Examples
For Example see some basic controls and its properties:
The following are the some basic controls which are being used and its properties.
TextBox Control: Textbox control is a basic control that mostly used. Textbox control has the main property called as "Text". This property should be empty because input is taken from the user. If wanted to enter the text as static, then give the text property as required. Appearance of the control can also be changed. The following figure shows the properties of a Text box.
Label Control: Label Control is used to display some text to the user. A label can be used in different ways. In later chapters, I will explain in detail about all the controls. Label Control also have the properties to change appearance. Label Control have the Text property which is used to display data.
Setting the property for a control
Steps
To set the properties for controls follow these steps.
Select the control.
Then automatically properties window for that control will be open.