Logo
PREGNANCY
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows Phone

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

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
- XNA Game Studio 3.0 : Creating Game Components - Adding Game Sounds
- Iphone Application : Using Gesture Recognizers (part 4)
- Iphone Application : Using Gesture Recognizers (part 3)
- Iphone Application : Using Gesture Recognizers (part 2)
- Iphone Application : Using Gesture Recognizers (part 1)
- Handling Input on Windows Phone 7 : Microphone Input
- Handling Input on Windows Phone 7 : Accelerometer
- XNA Game Studio 4.0 : XNA Game Studio Storage (part 2) - Getting a Device
- XNA Game Studio 4.0 : XNA Game Studio Storage (part 1) - Recreating the Project on Xbox, Devices and Containers
- XNA Game Studio 4.0 : Storage - Isolated Storage
 
 
Most view of day
- Windows Server 2012 Group Policies and Policy Management : Group Policy Policies Node
- Windows Server 2012 : Provisioning and managing shared storage (part 5) - Provisioning SMB shares - Creating general-purpose SMB shares
- Microsoft Exchange Server 2010 : Completing Transport Server Setup (part 5) - Getting Edge Subscription Details, Synchronizing Edge Subscriptions
- Windows Phone 7 : 3D Game Development (part 2) - Rendering 3D Primitives
- System Center Configuration Manager 2007 : Creating and Modifying Configurations (part 1)
- Customizing Windows 7 : Set Up a Desktop Slide Show
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Working with Office Safe Modes
- Managing Windows Small Business Server 2011 : Adding a Terminal Server (part 1)
- Client Access to Exchange Server 2007 : Using Outlook 2007 Collaboratively (part 3) - Using Group Schedules
- Windows Phone 7 : Running XNA Projects in Windows (part 3) - Input Differences, Isolated Storage, Application Life Cycle
Top 10
- Sharepoint 2013 : Working with the CSOM (part 6) - Working with the JavaScript client object model - Creating, reading, updating, and deleting in the JavaScript client object model
- Sharepoint 2013 : Working with the CSOM (part 5) - Working with the JavaScript client object model - Handling errors
- Sharepoint 2013 : Working with the CSOM (part 4) - Working with the JavaScript client object model - Returning collections
- Sharepoint 2013 : Working with the CSOM (part 3) - Working with the managed client object model - Creating, reading, updating, and deleting
- Sharepoint 2013 : Working with the CSOM (part 2) - Working with the managed client object model - Handling errors
- Sharepoint 2013 : Working with the CSOM (part 1) - Understanding client object model fundamentals
- Windows Phone 8 : Configuring Mailbox Settings (part 5) - Configuring Automatic Replies
- Windows Phone 8 : Configuring Mailbox Settings (part 4) - Lightening the Display,Changing the Mailbox Sync Settings
- Windows Phone 8 : Configuring Mailbox Settings (part 3) - Message Signatures, Blind CCing Yourself
- Windows Phone 8 : Configuring Mailbox Settings (part 2) - Unlinking Mailboxes, Conversation View
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro