Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
13Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
silverlight 2 - expression blend - styles and templates

silverlight 2 - expression blend - styles and templates

Ratings: (0)|Views: 3,411 |Likes:
Published by Jonathan Bates
Microsoft put out these five micro-topic quick-start guides to help developers using Expression Blend get accustomed to the second incarnation of MSFT's intriguing suite for RIA/Silverlight content and applications. The topics are:
- Quick Start Intro
- About Expression Blend
- Working with Text
-

Microsoft put out these five micro-topic quick-start guides to help developers using Expression Blend get accustomed to the second incarnation of MSFT's intriguing suite for RIA/Silverlight content and applications. The topics are:
- Quick Start Intro
- About Expression Blend
- Working with Text
- Styles and Templates
- The Workspace
Microsoft put out these five micro-topic quick-start guides to help developers using Expression Blend get accustomed to the second incarnation of MSFT's intriguing suite for RIA/Silverlight content and applications. The topics are:
- Quick Start Intro
- About Expression Blend
- Working with Text
-

Microsoft put out these five micro-topic quick-start guides to help developers using Expression Blend get accustomed to the second incarnation of MSFT's intriguing suite for RIA/Silverlight content and applications. The topics are:
- Quick Start Intro
- About Expression Blend
- Working with Text
- Styles and Templates
- The Workspace

More info:

Published by: Jonathan Bates on Jun 28, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/01/2013

pdf

text

original

 
 The topics in this section describe how you can customize Windows Presentation Foundation and Silverlight 2 controlsby creating a set of templates and styles, resulting in a unique and consistent look for your application. Templates andstyles define the pieces that make up a control and the default behavior of the control, respectively.
In This SectionConceptual
Style and template overview Working with simple styles SimpleButton SimpleCheckBox SimpleComboBox and SimpleComboBoxItem SimpleExpander SimpleListBox and SimpleListBoxItem SimpleMenu and SimpleMenuItem SimpleProgressBar SimpleScrollBar SimpleScrollViewer SimpleSlider SimpleTabControl and SimpleTabItem 
How to
Create a style resource Edit a style Styles and templates 
Note:
Styles and templates are not supported in Microsoft Silverlight 1.0 projects, but you can create JavaScript classes todefine reusable controls. For an example, see the Button class in the ButtonGallery sample that is available from theSamples tab in the Welcome Screen (on the Helpmenu). For more information, see theSilverlight learning center.
 
Page 1of 65Styles and templates6/16/2009file://C:\Windows\Temp\~hhD0B.htm
 
Apply a style resource Restore the default style Create or edit a control template Navigate the style hierarchy using the breadcrumb bar 
Try it
Try it: Create a button by using bitmap effects Try it: Add animation to a button Try it: Create a rollover button Try it: Customize the appearance of the check mark in a SimpleCheckBox Try it: Customize the appearance of the expander button in a SimpleComboBox Try it: Changing the look of the selected item in a SimpleListBox Try it: Customize the progress indicator of a SimpleProgressBar Try it: Customize the look of a SimpleScrollBar Try it: Customize the Thumb element of a SimpleSlider Try it: Customize the SimpleTabItem using a bitmap effect 
See also
Concepts
Simple styles Resources Sendfeedback on this topic to Microsoft. © 2008 Microsoft Corporation. All rights reserved.You can customize Windows Presentation Foundation (WPF) and Silverlight 2 controls in many ways, including bycreating a set of templates and styles for controls, This results in a unique and consistent look for your application.Templates and styles define the pieces that make up a control and the default behavior of the control, respectively. YouStyle and template overview
Note:
Styles and templates are not supported in Microsoft Silverlight 1.0 projects, but you can create JavaScript classes todefine reusable controls. For an example, see the Button class in the ButtonGallery sample that is available from theSamples tab in the Welcome Screen (on the Helpmenu). For more information, see theSilverlight learning center.
 
Page 2of 65Styles and templates6/16/2009file://C:\Windows\Temp\~hhD0B.htm
 
create templates and styles by making copies of the default system styles and templates for a control (because you can'tmodify system styles and templates). Modifying templates and styles is an easy way to essentially make new controlsin Design view of Microsoft Expression Blend, without having to use code.
The difference between styles and templates
The following table provides a detailed comparison of styles and templates to help you decide whether you want tomodify the style or template of a control, or both.
Characteristic Styles Templates
By using styles, you canmodify the default valuesof properties that are set onthe control to which thestyle is applied. Forexample, you can specifydefault colors for thebackground, border, andforeground of a controlsuch as a button.These style properties canbe overridden by the valuesthat are set on the controlitself when it is drawn onthe artboard. For example,if you set the backgroundcolor to blue in the style of a button, the button willUsing templates, you can modifythe structure of the control towhich the template is applied. Youcan modify a control template torearrange, add, or delete theelements (or parts) in the control.For example, you can add abackground image or design to acontrol such as a button.You can also modify the values of properties (such as backgroundcolor) that are set on the control towhich the template is applied.These template values cannot beoverridden by the values that areset on the control itself when it isdrawn on the artboard. However,you can use template-binding toset the properties of a templateaccording to the values of properties of the control when it isdrawn on the artboard.When you modify a template, youhave access to more parts of acontrol than when you modify astyle. For example, you canchange the way the pop-up listappears in a combo box, or youchange the look of the button thattriggers the pop-up list in thecombo box by modifying the itemstemplate. Some templates consistof the following parts:
Content Presenter Acontent presenter is aplaceholder in the controltemplate to display thecontent of the control towhich the template isapplied. This might be thevalue of a content property(in a button for example), or
Page 3of 65Styles and templates6/16/2009file://C:\Windows\Temp\~hhD0B.htm

Activity (13)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Midhat liked this
Cristobal Ruiz liked this
theblessed liked this
pradnya30 liked this
ihcnim liked this
s0pnadisht0 liked this
Muneesmf liked this
pavangandhi liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->