Building Your First Windows Phone 7 Application (part 5) - Styling Your Application

1/16/2011 9:30:17 AM

6. Styling Your Application

Either Visual Studio or Microsoft Expression Blend 4 can be used to design XAML-based Silverlight interfaces. Microsoft Expression Blend 4 provides tools for the graphical manipulations, and animations for creating more complex controls than Visual Studio. You will look at the basics of Blend and how Blend makes it easy to style controls.

  1. Open Microsoft Expression Blend 4, and select Windows Start => All Programs => Microsoft Expression Blend => Microsoft Expression Blend 4 for Windows Phone, as shown in Figure 14.

    Figure 14. Microsoft Expression Blend 4
  2. Click "Close" when you are prompted with the project type selector.

  3. In Blend 4, go to File => Open Project/Solution. Browse to the HelloWorld solution you created in the previous steps, as shown in Figure 15.

    Figure 15. Opening an existing project in Blend 4
  4. When the project opens, click the TextBox. Notice that in the Properties window you will see various properties that can be changed. If you do not see the Properties window, open it by going to Window => Properties, as shown in Figure 16.

    Figure 16. Properties window in Blend 4 when the control is selected
  5. In the Properties window's Brushes category, select Background => choose Gradient brush. Notice that the color editor now has ability to set the gradient color of the TextBox's background color.

  6. Choose the first gradient color of blue at 21% and second color of yellow at 64%, as shown in Figure 17.

    Figure 17. Applying gradient background to TextBox in Blend 4
  7. Go to Project => Run Project.

  8. When Change Device Selection window shows, choose Windows Phone 7 Emulator, as shown in Figure 18.

    Figure 18. Change Device Selection window in Blend 4
  9. Click OK and the HelloWorld application will start, as shown in Figure 19.

    Figure 19. HelloWorld after stylized in Blend 4
  •  Introducing Windows Phone 7 and the Windows Phone Platform
  •  Windows Phone Application Platform
  •  iPhone Application Development : Basic User Input and Output
  •  Mobile Phone Game Programming : A Quick J2ME Primer
  •  Mobile Phone Game Programming : Java As a Mobile Game Platform
  •  Mobile Phone Game Programming : Getting to Know Mobile Platforms
  •  Mobile Application Security : The Apple iPhone - Local Data Storage: Files, Permissions, and Encryption
  •  Mobile Application Security : The Apple iPhone - Permissions and User Controls
  •  iPhone Application Developmen : Using the View-Based Application Template (part 3)
  •  iPhone Application Developmen : Using the View-Based Application Template (part 2) - Preparing the View Controller Outlets and Actions
  •  iPhone Application Developmen : Using the View-Based Application Template (part 1)
  •  Mobile Application Security: Application Format
  •  Mobile Application Security: Security Testing
  •  Mobile Application Security: The Apple iPhone - Development
  •  Building Android Apps : Installing KiloGap in the Emulator
  •  Building Android Apps : Build KiloGap
  •  Building Android Apps: Create an Android Virtual Device
  •  Building Android Apps: Going Native - Setting Up the Environment
  •  Building Android Apps: Introduction to PhoneGap
  •  iPhone Application Development : How Xcode and Interface Builder Implement MVC
    Top 10
    Summarize Small Liquid Cooling System (Part 5)
    Samsung Galaxy Camera - An Android Compact 21X Shooter (Part 4)
    Samsung Galaxy Camera - An Android Compact 21X Shooter (Part 3)
    Samsung Galaxy Camera - An Android Compact 21X Shooter (Part 2)
    Samsung Galaxy Camera - An Android Compact 21X Shooter (Part 1)
    Summarize Small Liquid Cooling System (Part 4)
    Summarize Small Liquid Cooling System (Part 3)
    Summarize Small Liquid Cooling System (Part 2)
    Summarize Small Liquid Cooling System (Part 1)
    ASUS Orion Pro - Jack Of Both Trades
    Most View
    Computing Yourself Fit (Part 3)
    Microsoft ASP.NET 4 : Single-Value Data Binding
    Samsung Series 9 Premium Notebook - Lightweight Champion
    iPhone 3D Programming : Holodeck Sample (part 3) - Handling the Heads-Up Display
    Visual Studio 2010 : Understanding Solutions and Projects (part 1)
    Oracle Coherence 3.5 : Planning Your Caches - Anatomy of a clustered cache
    Laptop For All Budgets (Part 1)
    Windows Vista : Scripting and Automation - Object References (part 1) - How to Run Applications, How to Access the, How to Manipulate Files Registry
    Lenovo ThinkPad Tablet 2 (Part 1)
    A Case For Quality (Part 2) - Cocon – Handmade Case for iPad 2, Booqpad – Agenda for iPad 2/3
    Tips & Tricks : Print Your Own Greeting Cards
    SQL Server 2008 : Managing Query Performance - Adding Hints Through Plan Guides
    SQL Injection : Code-Level Defenses - Encoding Output
    Visual Studio Team System 2008 : Command Line (part 2)
    ASP.NET AJAX : Timed Refreshes
    Run Software In A Protective Sandbox
    Solutions For Mac’s Problems – Part 2
    Managing SharePoint Data : Writing a List Definition and List Instance
    SQL Server 2008 : Monitoring Your Server - Monitoring Your CPU
    Using Windows Phone 7 Technologies : Understanding Orientation and Movement