#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.

 

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: