#547 – Specifying Colors by Name in Blend

When you are specifying color values for a color-valued property in Blend, there are several different ways to specify a color.  You can select a color by selecting it from the palette, use the eyedropper tool, or enter RGB values directly.

You can also specify a color by entering a color value by name in the text field that initially displays the color as a hex value.

Below is a list of all predefined colors, which you can reference by name.

 

Advertisements

#546 – Adding Gradient Stops in Blend

A gradient fill can have a number of different stopspositions within the gradient that should take on a color value that you specify.

To add or remove stops for a gradient, start by selecting the control containing a property that you’ll set to a gradient.  (E.g. The Background property of a Label).

In the Brushes area of the Properties panel, click the icon for a Gradient brush.

Now we have a gradient with two gradient stops, going from all black at the top of the control to all white at the bottom.

You can click anywhere within the gradient line to add a gradient stop.  Once added, click on the gradient that you want to change and then select a color for the gradient on the color palette.

We can continue adding as many gradient stops as we like.

#545 – Locking Objects to Prevent Changes

When you’re working in Blend to design your user interface, you’ll often spend a lot of time setting properties for controls to get them to look just the way you want them.  Once you get a control set the way you want it, you can lock it to prevent inadvertently changing it as you work with other controls in your user interface.

To lock a control, left-click on the small circle at the far right of the line representing your control in the Objects and Timeline panel.

Once you click on this lock icon, the circle will change to look like a little lock.  At this point, you won’t be able to change the control from the artboard or the Properties panel.  You can also no longer select the control in the Objects and Timeline panel.  You can still change properties of the control, however, by editing its XAML directly.

#544 – Objects and Timeline Panel Shows the Logical Tree

In Blend, the Objects and Timeline panel, normally in the lower left corner of the user interface, shows the logical tree of all the objects currently shown on your artboard.

You can click on individual elements on the Objects and Timeline panel and the corresponding object on the artboard will be selected, as well as the matching XAML tag in the XAML editor.

You can temporarily hide objects and their child objects by clicking on the eyeball icon.  The object and all of its children will disappear from the artboard.  The object will still appear at runtime–hiding a control in this manner only hides it in the context of the editor in Blend.

#543 – Searching for Controls in the Assets Panel

While the Assets Panel is open, you can search for individual controls if you know the name, or part of the name.

Once you open the assets panel, you’ll see a search box that you can type in.

You can start typing a portion of the name of a control and your list will be limited to only controls whose name contains the text that you typed.

This will also work if you’re in the Grid mode, displaying controls as icons, rather than in a list.

#542 – Most Recently Used Asset

You can use the Assets Panel in Blend to add any available control to your user interface.  In the example below, we’ve added a DatePicker control.

You’ll notice that when you add a control to your user interface from the assets panel, a new icon appears on the Tools Panel, at the bottom.  This icon will always represent the control that you most recently added to your user interface.

Looking at the previous screenshot, you can see that an icon for the DatePicker control has been added to the tools panel.

Once the icon has been added to the tools panel, you can add additional instances of this control by double-clicking on the icon.

You can also left-click and hold to see a list of all of the recent controls that you have added.

#541 – Adding Elements from The Assets Panel in Blend

You can quickly add a large number of controls to your user interface in Blend using the corresponding icon on the tools panel.  However, for controls not available normally from the tools panel, you can add elements from the  Assets Panel.

To open the assets panel, click on the Assets tab that normally appears just to the right of the Projects tab in Blend.

You can explore within the listed menus to find the component that you’d like to add to your application.  Once you find a control that you want included, you can double-click to include it under the currently selected panel, or left-click and drag it to the artboard.