SlideShare ist ein Scribd-Unternehmen logo
1 von 51
WINDOWS PHONE 8
Designing Windows Phone Applications
FOLLOW US
Twitter

: @chothanihitesh

Slideshare

: http://www.slideshare.net/Chothani-Hitesh

Email

: chothani.hitesh@gmail.com

Support

: windows.chothani@live.com

LinkedIn

: in.linkedin.com/pub/hiteshchothani/6b/311/2b8

W8 Publisher

: AppStudios

WP Publisher : AppStudios
Website

: www.appmobinfotech.com
•DESIGNING AN APP

•INTRODUCTION TO XAML LAYOUT
•STYLES AND THEMES

•DESIGN TIME DATA
•DATA BINDING

•LISTS AND THE LONGLISTSELECTOR
THEME
DESIGNING AN APP
DESIGN ON PAPER BEFORE YOU TOUCH
THE TOOLS!
DESIGN APP NAVIGATION EARLY!
TOOLS FOR THE JOB: GRAPHICAL DESIGN



A UX designer can use Blend
to specify the appearance of

the user interface


A version of Blend for the phone
is supplied as part of the phone
SDK
TOOLS FOR THE JOB: CODE CREATION



A Developer can take the user
interface design and use

Visual Studio build the
program to make it work


Visual Studio provides a design
environment but it is not as
advanced as Blend
DESIGN STYLE AND PROGRAMMING


As programmers we probably start of just worrying about making the
program work




This is a very good place to start

But in modern systems the “look and feel” of the user interface is very
important




No matter how good the code is, if the program is hard to use it will not be popular

You should pay careful attention to the user interface when making
phone programs



If you know any Graphic Designers it is worth getting them on your
development team
PROJECT TEMPLATES AND COMPONENTS



Windows Phone SDK
provides a set of project

templates


Each of them maps onto a
particular style of application
APPLICATION TEMPLATES


Windows Phone App




Basic single page app

Windows Phone Databound App


Project for creating a Windows Phone application using List and navigation
controls with a basic Model-View-ViewModel architecture



Windows Phone Pivot App




User can “pivot” between different screens by flicking left and right

Windows Phone Panorama application


A single panoramic background with pages of controls that the user can pan
between
APPLICATION TYPES


Three application types provide quite different user experiences



Select the one that you feel is the most appropriate
INTRODUCTION TO XAML
LAYOUT
THE CONTOSO COOKBOOK RECIPE
DETAILS PAGE



This is a Pivot page that displays details
of a recipe


Picture and directions on one pane



Ingredients list on another pane
PIVOT PAGES
XAML AND OBJECTS



Every XAML element is a declaration of an object



XAML is a way of describing a UI using XML





XAML stands for XML Application Markup Language

This is a declarative way of expressing your UI

XAML elements == objects in the
System.Windows.Controls namespace



Each of the items on the screen of the application
shown is a graphical rendering of an object
XAML DISPLAY ELEMENTS
DISPLAY ELEMENT PROPERTIES


Each of the elements contains properties that define how it appears on
the screen


Position on the screen



Height and width



Font colour and size etc..



These values are used by XAML when the display is drawn



If these value are changed by the program the appearance of the
element will change
XAML ELEMENT CLASS HIERARCHY



The XAML class hierarchy is quite complex



Everything is based on the
FrameworkElement class which contains the
fundamental properties of all elements



You can derive your own components if you
wish
ELEMENTS AND XAML
GRID CONTAINER ELEMENT
STYLES AND THEMES
APPLYING STYLES TO ELEMENTS


You can set colors and font sizes for elements directly in XAML:



This is generally a BAD IDEA!


Difficult to match builtin styles



Difficult to work with Windows Phone Themes
FOREGROUND COLORS AND THEMES
USE BUILT-IN STYLES
NEW IN VS2012 – APPLY STYLES IN
VISUAL STUDIO
ALIGNMENT OF ELEMENTS


Alignment of UI elements is important!



The magic number in Windows Phone UI is 12px, or multiples of 12


Your page should have a nice, visually crisp line that is 24 pixels from the left of the
device’s screen



Gap between controls should be at least 12px



Align on 12px increments… though 6px or 18px may also be appropriate
FIXING THE ALIGNMENT OF THE RECIPE
PAGE
VISUAL STUDIO AND BLEND ALIGNMENT
GRID



Button at bottom of Designer window can
be used to show a 12px alignment Grid



Useful for setting alignment of elements



Available in Blend



Now also available in Visual Studio
ALIGNMENT GRID OVERLAY


All new projects include AlignmentGrid.png in the Assets folder



You can overlay the grid at design and runtime by uncommenting the
XAML that shows it


Included near the foot of MainPage.xaml



Copy to other pages to show on those
USING THE ALIGNMENT GRID
USE MARGIN PROPERTY TO INSERT
SPACING
DESIGN-TIME DATA
GENERATING DESIGN-TIME DATA
CREATING SAMPLE DATA FROM CLASS
EDIT DESIGN-TIME DATA FORMAT AND
VALUES
EDIT DESIGN-TIME DATA FORMAT AND
VALUES
DATA BINDING
DATA BINDING


Simplest way to program UI controls is to write your own “glue” to get and

set properties of controls




e.g. , textBox1.Text = "Hello, world";

In complex applications, such code quickly becomes unwieldy and error
prone.



Use XAML data binding to link your UI to a class in your application that
contains your application data




A data class that is a source for data binding is called a ViewModel

UI controls can get their display values automatically from properties of

viewmodel class


Changing the property, updates the display



User input can automatically update the bound property of the viewmodel class
DATA BINDING IN XAML



Properties of controls can be bound to a public property of a data object


In the example above, the Text property of the TextBlock is bound to the Directions
property of some data source



Define the data source by setting


The DataContext property of any containing FrameworkElement-derived class (a
containing control, the page, or the frame),



The ItemsSource property of a List control

or
INOTIFYPROPERTYCHANGED


Data objects that take part in One Way or TwoWay binding must
implement the INotifyPropertyChanged interface




This interface requires only that the object publishes the PropertyChanged event

Object must fire the PropertyChanged event whenever the value of one of its public
properties changes



The XAML runtime subscribes to this event and uses it to update databound UI
elements
VIEWMODEL IMPLEMENTATION IN
WINDOWS PHONE 8.0
OBSERVABLE COLLECTIONS
DESIGNING LISTS
LIST ITEM RENDERING


All Lists – ListBox, LongListSelector –
have no default rendering for data
items



If you simply bind the ItemsSource
property to a collection of objects, all

you get displayed in the list for each
item is the name of the data object type
GENERATING LISTS FROM DESIGN-TIME
DATA


In Blend, if you drag a
collection from the Data
window onto the design
surface while in List mode,
it generates a ListBox and

attempts a default
rendering for list items


Manually change to a
phone:LongListSelector in
the XAML
LISTS AND TEMPLATES


All the different elements that affect how a list displays content can be
customised



Each aspect is controlled by a template. For the LongListSelector, there are
many:


GroupFooterTemplate – area that shows at end of each group if LLS used to show
grouped items



GroupHeaderTemplate – area that shows at top of each group if LLS used to show
grouped items




JumpListStyle – layout of items in the Jump List, if enabled



ListFooterTemplate – area that shows at the foot of the whole list





ItemTemplate – layout for each data item

ListHeaderTemplate – area that shows at the top of the whole list

To change the layout of how each data item displays, we need to modify the
ItemTemplate
MODIFYING THE ITEMTEMPLATE IN
BLEND


Right-click on the list control, then access the Edit Additional Templates
menu


Design the controls in the template
DATATEMPLATE IN XAML
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 FlexJuan Sanchez
 
Wireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLWireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLDee Sadler
 
Storyboarding and Wireframe Tools Review
Storyboarding and Wireframe Tools ReviewStoryboarding and Wireframe Tools Review
Storyboarding and Wireframe Tools ReviewHenry Cogo
 
Save time with indesign
Save time with indesignSave time with indesign
Save time with indesignAndrew Gioulis
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end toolingThomas Daly
 
Things you can do to brand Office 365 now
Things you can do to brand Office 365 nowThings you can do to brand Office 365 now
Things you can do to brand Office 365 nowThomas Daly
 
Adobe illustrator CC 2017 introduction _ SEOSKILLS Hyderabad
Adobe illustrator CC 2017 introduction  _ SEOSKILLS HyderabadAdobe illustrator CC 2017 introduction  _ SEOSKILLS Hyderabad
Adobe illustrator CC 2017 introduction _ SEOSKILLS HyderabadSEO SKills
 
Building Blocks For Your Modules Ui
Building Blocks For Your Modules UiBuilding Blocks For Your Modules Ui
Building Blocks For Your Modules UiRoy Scholten
 
Wireframes for the Wicked
Wireframes for the WickedWireframes for the Wicked
Wireframes for the WickedNick Finck
 
Illustrator 2018 Regatta Artwork
Illustrator 2018 Regatta ArtworkIllustrator 2018 Regatta Artwork
Illustrator 2018 Regatta ArtworkJerry Arnold
 
Mockup, wireframe e visual: una breve introduzione
Mockup, wireframe e visual: una breve introduzioneMockup, wireframe e visual: una breve introduzione
Mockup, wireframe e visual: una breve introduzioneWEBdeBS
 
Illustrator 2018 Identity Package
Illustrator 2018 Identity PackageIllustrator 2018 Identity Package
Illustrator 2018 Identity PackageJerry Arnold
 
Unify Design & Deliverables
Unify Design & DeliverablesUnify Design & Deliverables
Unify Design & Deliverablesnathanacurtis
 
Illustrator 2018 Campground Icons
Illustrator 2018 Campground Icons Illustrator 2018 Campground Icons
Illustrator 2018 Campground Icons Jerry Arnold
 

Was ist angesagt? (19)

Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
 
Wireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLWireframing /Prototyping with HTML
Wireframing /Prototyping with HTML
 
Storyboarding and Wireframe Tools Review
Storyboarding and Wireframe Tools ReviewStoryboarding and Wireframe Tools Review
Storyboarding and Wireframe Tools Review
 
Save time with indesign
Save time with indesignSave time with indesign
Save time with indesign
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end tooling
 
Things you can do to brand Office 365 now
Things you can do to brand Office 365 nowThings you can do to brand Office 365 now
Things you can do to brand Office 365 now
 
Graphic design brochure
Graphic design  brochureGraphic design  brochure
Graphic design brochure
 
What is power point
What is power pointWhat is power point
What is power point
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Adobe illustrator CC 2017 introduction _ SEOSKILLS Hyderabad
Adobe illustrator CC 2017 introduction  _ SEOSKILLS HyderabadAdobe illustrator CC 2017 introduction  _ SEOSKILLS Hyderabad
Adobe illustrator CC 2017 introduction _ SEOSKILLS Hyderabad
 
Building Blocks For Your Modules Ui
Building Blocks For Your Modules UiBuilding Blocks For Your Modules Ui
Building Blocks For Your Modules Ui
 
Wireframes for the Wicked
Wireframes for the WickedWireframes for the Wicked
Wireframes for the Wicked
 
Illustrator 2018 Regatta Artwork
Illustrator 2018 Regatta ArtworkIllustrator 2018 Regatta Artwork
Illustrator 2018 Regatta Artwork
 
Mockup, wireframe e visual: una breve introduzione
Mockup, wireframe e visual: una breve introduzioneMockup, wireframe e visual: una breve introduzione
Mockup, wireframe e visual: una breve introduzione
 
Illustrator 2018 Identity Package
Illustrator 2018 Identity PackageIllustrator 2018 Identity Package
Illustrator 2018 Identity Package
 
Workshop Mock-Ups
Workshop Mock-UpsWorkshop Mock-Ups
Workshop Mock-Ups
 
Unify Design & Deliverables
Unify Design & DeliverablesUnify Design & Deliverables
Unify Design & Deliverables
 
CorelDraw Training Institute, Ghaziabad
CorelDraw Training Institute, GhaziabadCorelDraw Training Institute, Ghaziabad
CorelDraw Training Institute, Ghaziabad
 
Illustrator 2018 Campground Icons
Illustrator 2018 Campground Icons Illustrator 2018 Campground Icons
Illustrator 2018 Campground Icons
 

Andere mochten auch

Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10hitesh chothani
 
Windows phone 8 session 13
Windows phone 8 session 13Windows phone 8 session 13
Windows phone 8 session 13hitesh chothani
 
Windows phone 8 session 5
Windows phone 8 session 5Windows phone 8 session 5
Windows phone 8 session 5hitesh chothani
 
Windows phone 8 session 7
Windows phone 8 session 7Windows phone 8 session 7
Windows phone 8 session 7hitesh chothani
 
Windows phone 8 session 1
Windows phone 8 session 1Windows phone 8 session 1
Windows phone 8 session 1hitesh chothani
 
Windows phone 8 session 6
Windows phone 8 session 6Windows phone 8 session 6
Windows phone 8 session 6hitesh chothani
 
Windows phone 8 session 4
Windows phone 8 session 4Windows phone 8 session 4
Windows phone 8 session 4hitesh chothani
 
Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9hitesh chothani
 
Windows phone 8 session 11
Windows phone 8 session 11Windows phone 8 session 11
Windows phone 8 session 11hitesh chothani
 
Windows phone 8 session 8
Windows phone 8 session 8Windows phone 8 session 8
Windows phone 8 session 8hitesh chothani
 

Andere mochten auch (10)

Windows phone 8 session 10
Windows phone 8 session 10Windows phone 8 session 10
Windows phone 8 session 10
 
Windows phone 8 session 13
Windows phone 8 session 13Windows phone 8 session 13
Windows phone 8 session 13
 
Windows phone 8 session 5
Windows phone 8 session 5Windows phone 8 session 5
Windows phone 8 session 5
 
Windows phone 8 session 7
Windows phone 8 session 7Windows phone 8 session 7
Windows phone 8 session 7
 
Windows phone 8 session 1
Windows phone 8 session 1Windows phone 8 session 1
Windows phone 8 session 1
 
Windows phone 8 session 6
Windows phone 8 session 6Windows phone 8 session 6
Windows phone 8 session 6
 
Windows phone 8 session 4
Windows phone 8 session 4Windows phone 8 session 4
Windows phone 8 session 4
 
Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9
 
Windows phone 8 session 11
Windows phone 8 session 11Windows phone 8 session 11
Windows phone 8 session 11
 
Windows phone 8 session 8
Windows phone 8 session 8Windows phone 8 session 8
Windows phone 8 session 8
 

Ähnlich wie Windows phone 8 session 3

02 wp7 building silverlight applications
02 wp7   building silverlight applications02 wp7   building silverlight applications
02 wp7 building silverlight applicationsTao Wang
 
Windows 8 app bar and live tiles
Windows 8 app bar and live tilesWindows 8 app bar and live tiles
Windows 8 app bar and live tilesAmr Abulnaga
 
Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)Cheah Eng Soon
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
Basic android development
Basic android developmentBasic android development
Basic android developmentUpanya Singh
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightMICTT Palma
 
Building Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfBuilding Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfSivarajAmbat1
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer IntroductionTomy Ismail
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-TejamFandat
 
Introduction to silver light
Introduction to silver lightIntroduction to silver light
Introduction to silver lightjayc8586
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidDenis Minja
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex senthil0809
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 DavidRohit Ray
 
Introductontoxaml
IntroductontoxamlIntroductontoxaml
Introductontoxamlsunhope777
 

Ähnlich wie Windows phone 8 session 3 (20)

02 wp7 building silverlight applications
02 wp7   building silverlight applications02 wp7   building silverlight applications
02 wp7 building silverlight applications
 
Windows 8 app bar and live tiles
Windows 8 app bar and live tilesWindows 8 app bar and live tiles
Windows 8 app bar and live tiles
 
Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)Xamarin.Forms Hands On Lab (Begineer)
Xamarin.Forms Hands On Lab (Begineer)
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
Basic android development
Basic android developmentBasic android development
Basic android development
 
WP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a SilverlightWP7 HUB_Introducción a Silverlight
WP7 HUB_Introducción a Silverlight
 
Xamarin Development
Xamarin DevelopmentXamarin Development
Xamarin Development
 
Building Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfBuilding Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdf
 
Silverlight Developer Introduction
Silverlight   Developer IntroductionSilverlight   Developer Introduction
Silverlight Developer Introduction
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-
 
Android ui with xml
Android ui with xmlAndroid ui with xml
Android ui with xml
 
Introduction to silver light
Introduction to silver lightIntroduction to silver light
Introduction to silver light
 
XAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko JakovljevićXAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko Jakovljević
 
New Introductionfor Flash Designers
New Introductionfor Flash DesignersNew Introductionfor Flash Designers
New Introductionfor Flash Designers
 
Ap quiz app
Ap quiz appAp quiz app
Ap quiz app
 
Android Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_androidAndroid Bootcamp Tanzania:understanding ui in_android
Android Bootcamp Tanzania:understanding ui in_android
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex
 
Btb017 David
Btb017 DavidBtb017 David
Btb017 David
 
Introductontoxaml
IntroductontoxamlIntroductontoxaml
Introductontoxaml
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 

Kürzlich hochgeladen

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Kürzlich hochgeladen (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

Windows phone 8 session 3

  • 1. WINDOWS PHONE 8 Designing Windows Phone Applications
  • 2. FOLLOW US Twitter : @chothanihitesh Slideshare : http://www.slideshare.net/Chothani-Hitesh Email : chothani.hitesh@gmail.com Support : windows.chothani@live.com LinkedIn : in.linkedin.com/pub/hiteshchothani/6b/311/2b8 W8 Publisher : AppStudios WP Publisher : AppStudios Website : www.appmobinfotech.com
  • 3. •DESIGNING AN APP •INTRODUCTION TO XAML LAYOUT •STYLES AND THEMES •DESIGN TIME DATA •DATA BINDING •LISTS AND THE LONGLISTSELECTOR
  • 6. DESIGN ON PAPER BEFORE YOU TOUCH THE TOOLS!
  • 8. TOOLS FOR THE JOB: GRAPHICAL DESIGN  A UX designer can use Blend to specify the appearance of the user interface  A version of Blend for the phone is supplied as part of the phone SDK
  • 9. TOOLS FOR THE JOB: CODE CREATION  A Developer can take the user interface design and use Visual Studio build the program to make it work  Visual Studio provides a design environment but it is not as advanced as Blend
  • 10. DESIGN STYLE AND PROGRAMMING  As programmers we probably start of just worrying about making the program work   This is a very good place to start But in modern systems the “look and feel” of the user interface is very important   No matter how good the code is, if the program is hard to use it will not be popular You should pay careful attention to the user interface when making phone programs  If you know any Graphic Designers it is worth getting them on your development team
  • 11. PROJECT TEMPLATES AND COMPONENTS  Windows Phone SDK provides a set of project templates  Each of them maps onto a particular style of application
  • 12. APPLICATION TEMPLATES  Windows Phone App   Basic single page app Windows Phone Databound App  Project for creating a Windows Phone application using List and navigation controls with a basic Model-View-ViewModel architecture  Windows Phone Pivot App   User can “pivot” between different screens by flicking left and right Windows Phone Panorama application  A single panoramic background with pages of controls that the user can pan between
  • 13. APPLICATION TYPES  Three application types provide quite different user experiences  Select the one that you feel is the most appropriate
  • 15. THE CONTOSO COOKBOOK RECIPE DETAILS PAGE  This is a Pivot page that displays details of a recipe  Picture and directions on one pane  Ingredients list on another pane
  • 17. XAML AND OBJECTS  Every XAML element is a declaration of an object   XAML is a way of describing a UI using XML   XAML stands for XML Application Markup Language This is a declarative way of expressing your UI XAML elements == objects in the System.Windows.Controls namespace  Each of the items on the screen of the application shown is a graphical rendering of an object
  • 19. DISPLAY ELEMENT PROPERTIES  Each of the elements contains properties that define how it appears on the screen  Position on the screen  Height and width  Font colour and size etc..  These values are used by XAML when the display is drawn  If these value are changed by the program the appearance of the element will change
  • 20. XAML ELEMENT CLASS HIERARCHY  The XAML class hierarchy is quite complex  Everything is based on the FrameworkElement class which contains the fundamental properties of all elements  You can derive your own components if you wish
  • 24. APPLYING STYLES TO ELEMENTS  You can set colors and font sizes for elements directly in XAML:  This is generally a BAD IDEA!  Difficult to match builtin styles  Difficult to work with Windows Phone Themes
  • 27. NEW IN VS2012 – APPLY STYLES IN VISUAL STUDIO
  • 28. ALIGNMENT OF ELEMENTS  Alignment of UI elements is important!  The magic number in Windows Phone UI is 12px, or multiples of 12  Your page should have a nice, visually crisp line that is 24 pixels from the left of the device’s screen  Gap between controls should be at least 12px  Align on 12px increments… though 6px or 18px may also be appropriate
  • 29. FIXING THE ALIGNMENT OF THE RECIPE PAGE
  • 30. VISUAL STUDIO AND BLEND ALIGNMENT GRID  Button at bottom of Designer window can be used to show a 12px alignment Grid  Useful for setting alignment of elements  Available in Blend  Now also available in Visual Studio
  • 31. ALIGNMENT GRID OVERLAY  All new projects include AlignmentGrid.png in the Assets folder  You can overlay the grid at design and runtime by uncommenting the XAML that shows it  Included near the foot of MainPage.xaml  Copy to other pages to show on those
  • 33. USE MARGIN PROPERTY TO INSERT SPACING
  • 36. CREATING SAMPLE DATA FROM CLASS
  • 37. EDIT DESIGN-TIME DATA FORMAT AND VALUES
  • 38. EDIT DESIGN-TIME DATA FORMAT AND VALUES
  • 40. DATA BINDING  Simplest way to program UI controls is to write your own “glue” to get and set properties of controls   e.g. , textBox1.Text = "Hello, world"; In complex applications, such code quickly becomes unwieldy and error prone.  Use XAML data binding to link your UI to a class in your application that contains your application data   A data class that is a source for data binding is called a ViewModel UI controls can get their display values automatically from properties of viewmodel class  Changing the property, updates the display  User input can automatically update the bound property of the viewmodel class
  • 41. DATA BINDING IN XAML  Properties of controls can be bound to a public property of a data object  In the example above, the Text property of the TextBlock is bound to the Directions property of some data source  Define the data source by setting  The DataContext property of any containing FrameworkElement-derived class (a containing control, the page, or the frame),  The ItemsSource property of a List control or
  • 42. INOTIFYPROPERTYCHANGED  Data objects that take part in One Way or TwoWay binding must implement the INotifyPropertyChanged interface   This interface requires only that the object publishes the PropertyChanged event Object must fire the PropertyChanged event whenever the value of one of its public properties changes  The XAML runtime subscribes to this event and uses it to update databound UI elements
  • 46. LIST ITEM RENDERING  All Lists – ListBox, LongListSelector – have no default rendering for data items  If you simply bind the ItemsSource property to a collection of objects, all you get displayed in the list for each item is the name of the data object type
  • 47. GENERATING LISTS FROM DESIGN-TIME DATA  In Blend, if you drag a collection from the Data window onto the design surface while in List mode, it generates a ListBox and attempts a default rendering for list items  Manually change to a phone:LongListSelector in the XAML
  • 48. LISTS AND TEMPLATES  All the different elements that affect how a list displays content can be customised  Each aspect is controlled by a template. For the LongListSelector, there are many:  GroupFooterTemplate – area that shows at end of each group if LLS used to show grouped items  GroupHeaderTemplate – area that shows at top of each group if LLS used to show grouped items   JumpListStyle – layout of items in the Jump List, if enabled  ListFooterTemplate – area that shows at the foot of the whole list   ItemTemplate – layout for each data item ListHeaderTemplate – area that shows at the top of the whole list To change the layout of how each data item displays, we need to modify the ItemTemplate
  • 49. MODIFYING THE ITEMTEMPLATE IN BLEND  Right-click on the list control, then access the Edit Additional Templates menu  Design the controls in the template