Dev Environment
Documentation
On Line
Local
Visual Studio
Designer
Code Window
Solutions, Projects...
View Classes
MainPage.xaml
Model classes
Customer
ViewModel Classes
MainViewModel
Expression Blend
UI & Controls
UI
Controls
Layout
Grid
StackPanel
Visible Controls
TextBlock
Lists and Details Pages
TextBox
RadioButtons
Properties
Height
Width
Vertical Alignment
HorizontalAlignment
Margin
Styles (postponed)
Data
Customer
Generating Data
Data Binding
MVVM
Model
Customers
Customer Class
Customer Collection
View
Data Context (current customer)
ViewModel
Customer Properties
Language
C#
Classes
Member variables/ fields
Typically private
Properties
Typically public
Automatic properties public Customer Name { get; set; }
Methods
Constructor is method, but no return value
Constructor with no params = default
Initialization vs. using setters
Return values or void (except constructor)
Return can be of any type
Signature = name + params
Overload by signature
Overload by changing type of parameters
Overload by number of params
Memory Management
No pointers (references)
Garbage collection
Interfaces
Creates a contract
Meets needs of M.I.
Implemented by a class
MVVM
Generics - Type safe collections
Objective C
Allocate memory
Pointers
Deallocate when finished
MVC
Xaml
Declarative
Machine Readable
Isomorphic with CLR objects
Anything created in Xaml can be created in C#
Subtopic 4
Object Oriented
Encapsulation
Polymorphism
User Created Types (Classes)
Applications
Navigation
Consistent
Through launching
Launching tombstones previous foreground app if any
Launch vs. resume
Back via back button
Stages
Launch
Activate
Running
Deactivate
Close
Responsive
Only one application in foreground
Background apps are tombstoned
Lists and Details
Provide a list of customers
For each customer show full details when selected
Reuse Customer class from previous tutorial
View (MVVM)
Windows Phone List Application
Starter List Page
Understanding out of the box
Modifying to accommodate customer
Changes are minor
Update header
Update data source and Context
Update Xaml (bindings)
List ItemsSource -Observable collection
Observable collection implements INotifyPropertyChanged
Starter details Page
Use index passed to page query to find record
Bind to the Customer from within the collection
Interaction with other applications
Launchers
No value returned
Example: Launch phone application
Choosers
Value returned
Example, get phone number from contacts