#191 – Setting a Control’s Properties Using Visual Studio

You can set a control’s properties in either Blend or Visual Studio.  To set properties for a control in Visual Studio, do the following:

Open the window containing the control.  Left-click to select the control.

Notice that all of the button’s properties are now listed on the Properties tab of the Properties window, at the right side of the main Visual Studio window.

You can change a property’s value by entering the value directly into the right column in this window.  When you click in this area, the appropriate editor will pop up, depending on the property’s type.  For example, clicking on the dropdown for the Background property causes a color selector to pop up.

Once you change a property value, you’ll see the new value reflected in the XAML for the control that you changed.  Notice that the value is converted to a textual representation.

 

Advertisements