Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Phone

Windows Phone 8 : Designing for the Phone - Blend Basics (part 2) - Brushes

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/24/2013 6:20:43 PM

2. Brushes

Another common task in Blend is to select how to “paint” a particular element of your design.XAML uses brushes to paint surfaces, and Blend supports this through the Brushes section of the Properties panel, as shown in Figure 9.

Figure 9. Brushes in the Properties panel

Image

The Brushes section of the Properties panel is made up of a number of sections you will want to become familiar with. The first section (#1 in Figure 8) lists the brushes the particular object supports. In this example it’s a simple Rectangle object, so you can set the brush for both the Fill and the Stroke of the Rectangle. This is like a small ListBox, so picking a brush will let you pick the properties for that brush in the lower part of the Brushes section. The second section (#2) lists the available brush types. This section takes the form of a set of tabs for each type of brush. Table 1 lists the brush editors.

Table 1. Brush Editors

Image
Image
Image

Within the brush editor you can directly create two types of resources: color resources and brush resources. These are created in different ways, but both originate on the brush editor. First, let’s create a color resource. We can do this by clicking the small square next to the color picker, as shown in Figure 10.

Figure 10. Converting a color to a resource

Image

Selecting Convert to New Resource opens a dialog box where you can create a new named resource that will show up in the Resources list in the color editor, as shown in Figure 11.

Figure 11. Creating a color resource

Image

After you name the resource, you will also need to specify where to define the resource. Your options are labeled “Application,” “This document,” and “Resource dictionary.” Typically you would choose “Application” or “Resource dictionary” if you have one. Defining a resource at the application level allows the resource to be used on any page in your application. Defining this resource enables you to specify it by name, and if it’s changed later in the design workflow, the change affects every use of this color. This color resource can also be used in other brushes (for example, gradient brushes). Once you have a color resource, you can use it via the “Color resources” tab, as shown in Figure 12.

Figure 12. Applying a color resource

Image

The other type of resource is a brush resource. This is different because, instead of defining a color to be used in a brush, you can define an entire brush (for example, image, gradient, or solid color brush). This way, you can define a named brush so that if you later change a brush from a solid color brush to a gradient brush the change cascades to all uses. You can create a brush resource like you created a color resource, but the context menu is in a different location. This time you will use the small square to open the context menu on the brush itself instead of the color, as shown in Figure 13.

Figure 13. Creating a brush resource

Image

Applying the brush resource is similar, too. You would show the Resource Brush tab and pick the local brush resource you want to use, as shown in Figure 14.

Figure 14. Applying a brush resource

Image

Dealing with brushes is a pretty typical task. Using these techniques, you’ll be up to speed in using Blend to create your Windows Phone applications quickly.

Other -----------------
- Windows Phone 8 : Designing for the Phone - Microsoft Expression Blend
- Windows Phone 7 Programming Model : Asynchronous Programming - Background Threads
- Windows Phone 8 : Designing for the Phone - Deciding on an Application Paradigm
- Windows Phone 8 : Designing for the Phone - The Third Screen
- Windows Phone 7 Programming Model : Web Browser Control
- Windows Phone 7 Programming Model : Tasks
- Windows Phone 7 Programming Model : Application Data Persistence
- Windows Phone 7 Programming Model : Device Information
- iphone Programming : Mixing OpenGL ES and UIKit, Rendering Confetti, Fireworks, and More: Point Sprites
- iphone Programming : Animation with Sprite Sheets, Image Composition and a Taste of Multitexturing
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server