SlideShare a Scribd company logo
1 of 38
Download to read offline
An Introduction to
Silverlight
Topics
   The Metro design style
   Silverlight Components
   Creating a Silverlight Application
   Silverlight and XAML
   Introduction to Silverlight Layout
   Components and Events
   Silverlight Project Templates
   ApplicationBar
   Page Navigation




2   Windows Phone
Windows Phone
Windows Phone and Metro

 To make life easier for us the Metro style is
  “baked in” to the Windows developer tools
 The default appearance, behaviour and fonts
  of the user elements all match the style
 If you want to find out more about Metro on
  phone you can read the “User Experience
  Design Guidelines”
    http://msdn.microsoft.com/en-
       us/library/hh202915.aspx



4   Windows Phone
Tools for the job: Graphical Design
 Great design separates the
  graphical design aspects from the
  programming
      The designer works on the look
       and feel of the application
      The programmer implements
       the required behaviours
 Silverlight is designed to support this
 A Silverlight designer can use the
  “Expression Blend” to specify the
  appearance of the user interface
      A version of Blend for the
       phone is supplied as part of the
       phone SDK

5   Windows Phone                           5
Metro Templates and
Components
 Visual Studio
  provides a set of
  Metro project
  templates
 Each of them
  maps onto a
  particular style of
  application




6   Windows Phone       6
Application Types and Templates




 The three application types provide quite different user experiences
 Select the one that you feel is the most appropriate


7   Windows Phone                              7
Silverlight display elements

   Application title
   Page title
   First number
   Plus text
   Second number
   Equals button
   Result text




8   Windows Phone       8
Silverlight element class hierarchy
                                                         FrameworkElement




 The Silverlight class hierarchy is quite
  complex
                                             TextBlock             Control
 Everything is based on the
  FrameworkElement class which
  contains the fundamental properties
                                                         TextBox             ContentControl
  of all elements
 You can derive your own
  components if you wish                                                      ButtonBase




                                                                                Button




9   Windows Phone                                    9
Elements in AddingMachine

 The adding machine actually contains three different types of Silverlight
  display element
 TextBox
     Used to receive user input from the keyboard
 TextBlock
     Used to display messages to the user
 Button
     Used to cause events in the application




1   Windows Phone                              10
0
Elements and XAML
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox Height="72" HorizontalAlignment="Left"
              Margin="8,19,0,0" Name="firstNumberTextBox"
              Text="0" VerticalAlignment="Top" Width="460"
              TextAlignment="Center" />
     . . .
        <Button Content="equals" Height="72"
                HorizontalAlignment="Left"
                Margin="158,275,0,0" Name="equalsButton"
                VerticalAlignment="Top" Width="160"
                Click="equalsButton_Click" />
     . . .
    </Grid>




   XAML is the markup language that describes the Silverlight UI
    components

1    Windows Phone                             11
1
Grid container element
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox Height="72" HorizontalAlignment="Left"
              Margin="8,19,0,0" Name="firstNumberTextBox"
              Text="0" VerticalAlignment="Top" Width="460"
              TextAlignment="Center" />
     . . .
        <Button Content="equals" Height="72"
                HorizontalAlignment="Left"
                Margin="158,275,0,0" Name="equalsButton"
                VerticalAlignment="Top" Width="160"
                Click="equalsButton_Click" />
     . . .
    </Grid>




   Grid is a container into which you can position display elements

1    Windows Phone                              12
2
TextBox element
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox Height="72" HorizontalAlignment="Left"
              Margin="8,19,0,0" Name="firstNumberTextBox"
              Text="0" VerticalAlignment="Top" Width="460"
              TextAlignment="Center" />
     . . .
        <Button Content="equals" Height="72"
                HorizontalAlignment="Left"
                Margin="158,275,0,0" Name="equalsButton"
                VerticalAlignment="Top" Width="160"
                Click="equalsButton_Click" />
     . . .
    </Grid>



 TextBox is used for text entry
 TextBlock can be used for text display

1    Windows Phone                           13
3
Button element
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox Height="72" HorizontalAlignment="Left"
              Margin="8,19,0,0" Name="firstNumberTextBox"
              Text="0" VerticalAlignment="Top" Width="460"
              TextAlignment="Center" />
     . . .
        <Button Content="equals" Height="72"
                HorizontalAlignment="Left"
                Margin="158,275,0,0" Name="equalsButton"
                VerticalAlignment="Top" Width="160"
                Click="equalsButton_Click" />
     . . .
    </Grid>




   Button is used for user actions and generates events when activated

1    Windows Phone                            14
4
Button element
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <TextBox Height="72" HorizontalAlignment="Left"
              Margin="8,19,0,0" Name="firstNumberTextBox"
              Text="0" VerticalAlignment="Top" Width="460"
              TextAlignment="Center" />
     . . .
        <Button Content="equals" Height="72"
                HorizontalAlignment="Left"
                Margin="158,275,0,0" Name="equalsButton"
                VerticalAlignment="Top" Width="160"
                Click="equalsButton_Click" />
     . . .
    </Grid>




   Click is the button clicked event which is bound to the method
    specified

1    Windows Phone                             15
5
Button click event handler
    private void equalsButton_Click(object sender, RoutedEventArgs e)
    {
        float v1 = float.Parse(firstNumberTextBox.Text);
        float v2 = float.Parse(secondNumberTextBox.Text);

            float result = v1 + v2;

            resultTextBlock.Text = result.ToString();
    }




   The event hander for the button takes the values out of the textboxes,
    parses them and then calculates and displays the result


1       Windows Phone                            16
6
Demo

Demo 1: The Silverlight
Adding Machine


                          17
Best Practice: Keyboard use

 It is best if the user can still press
  the equals button when the
  keyboard is displayed
 This means the equals button
  should be moved up the screen




1   Windows Phone                          18
8
Selecting Orientations
    SupportedOrientations="Portrait"


    SupportedOrientations="PortraitOrLandscape"

       A XAML property for the phone application page lets you select the orientation
        options available
       Your application can bind to an event which is fired when the orientation
        changes




1       Windows Phone                                   19
9
Using a StackPanel
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
       <StackPanel>
          <TextBox Height="72" HorizontalAlignment="Center" .../>
          <TextBlock Height="56" HorizontalAlignment="Center" .../>
          <TextBox Height="72" HorizontalAlignment="Center" .../>
          <Button Content="equals" Height="72" ...>
          <TextBlock Height="46" HorizontalAlignment="Center" .../>
       </StackPanel>
    </Grid>




   To automatically handle orientation change we can use a StackPanel
    container that will stack the display components

2    Windows Phone                           20
0
Demo


Demo 2: Orientation Handling

                               21
Handling errors
    try
    {
      v1 = float.Parse(firstNumberTextBox.Text);
      v2 = float.Parse(secondNumberTextBox.Text);
    }
    catch
    {
        MessageBox.Show("Invalid number");
        return;
    }




 A program can catch errors as on the desktop
 There is also a MessageBox mechanism as well



2    Windows Phone                            22
2
Configuring the input scope
    <TextBox InputScope="Number" ...


 If all you want from the user is a number it is
  dangerous to allow them to enter text as well
 You can add to the XAML to specify that the
  keyboard only accepts numbers




2    Windows Phone                              23
3
Demo

Demo 3: Complete
Adding
Machine

                   24
ApplicationBar
Application Chrome
System Tray and Application Bar
 System Tray
     System owned indicator area that
      displays system-level status
      information
     Apps can show/hide
     Microsoft.Phone.Shell.SystemTray.
         IsVisible = false;
 Application Bar
     Area where applications can display
      buttons for the most common tasks
     Can display pop-up menu for less
      common tasks
2   Windows Phone                           26
6
Application Bar




2
7
Application Bar in Xaml
<phone:PhoneApplicationPage
  x:Class=“MyApp.MainPage”
  … >

    <phone:PhoneApplicationPage.ApplicationBar>
      <shell:ApplicationBar x:Name="AppBar" IsMenuEnabled="True">
          <shell:ApplicationBar.Buttons>
              <shell:ApplicationBarIconButton x:Name="NewContactButton"
                     IconUri="Images/appbar.new.rest.png" Text="New"
                     Click="NewContactButton_Click"/>
              <shell:ApplicationBarIconButton x:Name="SearchButton"
                     IconUri="Images/appbar.feature.search.rest.png"
                     Text="Find" Click="SearchButton_Click"/>
          </shell:ApplicationBar.Buttons>
          <shell:ApplicationBar.MenuItems>
              <shell:ApplicationBarMenuItem x:Name="GenerateMenuItem"
                    Text="Generate Data" Click="GenerateMenuItem_Click" />
              <shell:ApplicationBarMenuItem x:Name="ClearMenuItem"
                     Text="Clear Data" Click="ClearMenuItem_Click" />
          </shell:ApplicationBar.MenuItems>
      </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>



2     Windows Phone                   28
8
App Bar & Landscape




2   Windows Phone
9
Page Navigation
Frame and Page
 Frame
     Top-level container control
     PhoneApplicationFrame class
     Contains the page control and
      system elements such as
      system tray and application bar
 Page
     Fills the entire content region of
      the frame
     PhoneApplicationPage-derived
      class
     Contains a title
     Optionally surfaces its own
      application bar

3   Windows Phone
1
Page Navigation
    Silverlight on Windows Phone uses
     a Page-based navigation model
          Similar to web page model
          Each page identified by a URI
          Each page is essentially stateless

    private void hyperlinkButton1_Click(
           object sender, RoutedEventArgs e)
    {
      NavigationService.Navigate(
         new Uri("/SecondPage.xaml",
                UriKind.RelativeOrAbsolute)
      );
    }



3    Windows Phone
2
Navigating Back
   Application can provide controls to
    navigate
    back to preceding page
    private void button1_Click(
      object sender, RoutedEventArgs e)
    {
        NavigationService.GoBack();
    }


   The hardware Back key will also
    navigate back to
    preceding page
         No code required – built-in behaviour



3   Windows Phone
3
Demo


ApplicationBar, Page Navigation and Pivot
Control

                                            34
Review

   Windows Phone applications use Silverlight to express the design of their user
    interface
        The design is expressed in a XAML text file that identifies and configures
          display elements
        Elements can also be manipulated as code objects
   There are a set of Silverlight templates for applications and elements based on
    the Metro design
   You can create multiple Silverlight pages and add them to your project
   Navigation to pages is performed on the basis of uri (Uniform Resource
    Indicator) values
   The back button normally navigates back to the source page, but this can be
    overridden
   The uri can contain simple text messages
   Pages can share larger objects in the App.xaml page


3   Windows Phone                                    35
5
Bonus
  (and really good to know)
Silverlight Toolkit for Windows
Phone the Microsoft Silverlight team
A product of
 The Silverlight Toolkit adds tons of additional controls ‘out of band’ from
  the official product control set
 Includes full open source code, samples, documentation, and design-
  time support for controls
 Refresh every 3 months or so
      Bug fixes
      New controls
 http://silverlight.codeplex.com




3
7
NuGet

 Package management system for .NET
 Simplifies incorporating 3rd party libraries
 Developer focused
 Free, open source


 Install NuGet using the Visual Studio
  Extension Manager
 Use NuGet to add libraries such as the
  Silverlight Toolkit to your project



3   Windows Phone
8

More Related Content

What's hot

Windows xp unit a
Windows xp unit aWindows xp unit a
Windows xp unit aDo Sincere
 
Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Ella Marie Wico
 
Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Bhushan Mulmule
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basicmanish maurya
 
Chapter 03 - Program Coding and Design
Chapter 03 - Program Coding and DesignChapter 03 - Program Coding and Design
Chapter 03 - Program Coding and Designpatf719
 
Computer homework
Computer homeworkComputer homework
Computer homeworkadarsh-kaul
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)iFour Technolab Pvt. Ltd.
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01Ankit Dubey
 
Vista Users Guide
Vista Users GuideVista Users Guide
Vista Users Guidenoverm1
 
INTRODUCTION TO VISUAL BASICS
INTRODUCTION TO VISUAL BASICS INTRODUCTION TO VISUAL BASICS
INTRODUCTION TO VISUAL BASICS Prof Ansari
 

What's hot (18)

Intake 37 9
Intake 37 9Intake 37 9
Intake 37 9
 
Spf chapter10 events
Spf chapter10 eventsSpf chapter10 events
Spf chapter10 events
 
Windows xp unit a
Windows xp unit aWindows xp unit a
Windows xp unit a
 
Creating a quiz using visual basic 6
Creating a quiz using visual basic 6Creating a quiz using visual basic 6
Creating a quiz using visual basic 6
 
12 gui concepts 1
12 gui concepts 112 gui concepts 1
12 gui concepts 1
 
Tutorials2
Tutorials2Tutorials2
Tutorials2
 
Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
IDS FortuneNext 6i Property Management: Hot keys and keyboard short cuts
IDS FortuneNext 6i Property Management: Hot keys and keyboard short cutsIDS FortuneNext 6i Property Management: Hot keys and keyboard short cuts
IDS FortuneNext 6i Property Management: Hot keys and keyboard short cuts
 
Controls events
Controls eventsControls events
Controls events
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basic
 
Chapter 03 - Program Coding and Design
Chapter 03 - Program Coding and DesignChapter 03 - Program Coding and Design
Chapter 03 - Program Coding and Design
 
Computer homework
Computer homeworkComputer homework
Computer homework
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
 
Chapter03 Ppt
Chapter03 PptChapter03 Ppt
Chapter03 Ppt
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Vista Users Guide
Vista Users GuideVista Users Guide
Vista Users Guide
 
INTRODUCTION TO VISUAL BASICS
INTRODUCTION TO VISUAL BASICS INTRODUCTION TO VISUAL BASICS
INTRODUCTION TO VISUAL BASICS
 

Viewers also liked

follow-app BOOTCAMP 3: Android
follow-app BOOTCAMP 3: Androidfollow-app BOOTCAMP 3: Android
follow-app BOOTCAMP 3: AndroidQIRIS
 
follow-app DAY 1: Manager e leader
follow-app DAY 1: Manager e leaderfollow-app DAY 1: Manager e leader
follow-app DAY 1: Manager e leaderQIRIS
 
follow-app BOOTCAMP 4: iOS
follow-app BOOTCAMP 4: iOSfollow-app BOOTCAMP 4: iOS
follow-app BOOTCAMP 4: iOSQIRIS
 
follow-app DAY 2: Dal mercato al business
follow-app DAY 2: Dal mercato al businessfollow-app DAY 2: Dal mercato al business
follow-app DAY 2: Dal mercato al businessQIRIS
 
Francesco Inguscio - Avviare una start-up
Francesco Inguscio - Avviare una start-upFrancesco Inguscio - Avviare una start-up
Francesco Inguscio - Avviare una start-upQIRIS
 
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...QIRIS
 
follow-app DAY 4 - Strumenti per la prototipazione
follow-app DAY 4 - Strumenti per la prototipazionefollow-app DAY 4 - Strumenti per la prototipazione
follow-app DAY 4 - Strumenti per la prototipazioneQIRIS
 
follow-app DAY 1: Facebook IPO
follow-app DAY 1: Facebook IPOfollow-app DAY 1: Facebook IPO
follow-app DAY 1: Facebook IPOQIRIS
 

Viewers also liked (8)

follow-app BOOTCAMP 3: Android
follow-app BOOTCAMP 3: Androidfollow-app BOOTCAMP 3: Android
follow-app BOOTCAMP 3: Android
 
follow-app DAY 1: Manager e leader
follow-app DAY 1: Manager e leaderfollow-app DAY 1: Manager e leader
follow-app DAY 1: Manager e leader
 
follow-app BOOTCAMP 4: iOS
follow-app BOOTCAMP 4: iOSfollow-app BOOTCAMP 4: iOS
follow-app BOOTCAMP 4: iOS
 
follow-app DAY 2: Dal mercato al business
follow-app DAY 2: Dal mercato al businessfollow-app DAY 2: Dal mercato al business
follow-app DAY 2: Dal mercato al business
 
Francesco Inguscio - Avviare una start-up
Francesco Inguscio - Avviare una start-upFrancesco Inguscio - Avviare una start-up
Francesco Inguscio - Avviare una start-up
 
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
follow-app BOOTCAMP 2: Building windows phone applications with visual studio...
 
follow-app DAY 4 - Strumenti per la prototipazione
follow-app DAY 4 - Strumenti per la prototipazionefollow-app DAY 4 - Strumenti per la prototipazione
follow-app DAY 4 - Strumenti per la prototipazione
 
follow-app DAY 1: Facebook IPO
follow-app DAY 1: Facebook IPOfollow-app DAY 1: Facebook IPO
follow-app DAY 1: Facebook IPO
 

Similar to follow-app BOOTCAMP 2: Introduction to silverlight

02 getting started building windows runtime apps
02   getting started building windows runtime apps02   getting started building windows runtime apps
02 getting started building windows runtime appsWindowsPhoneRocks
 
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
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshopdhi her
 
Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Fons Sonnemans
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발영욱 김
 
Csphtp1 12
Csphtp1 12Csphtp1 12
Csphtp1 12HUST
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0Aarti P
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8FITC
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & AnimationNguyen Tuan
 
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8netmind
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWTbackdoor
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMSaraswathiRamalingam
 

Similar to follow-app BOOTCAMP 2: Introduction to silverlight (20)

02 getting started building windows runtime apps
02   getting started building windows runtime apps02   getting started building windows runtime apps
02 getting started building windows runtime apps
 
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
 
Android
AndroidAndroid
Android
 
4.C#
4.C#4.C#
4.C#
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshop
 
Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
Csphtp1 12
Csphtp1 12Csphtp1 12
Csphtp1 12
 
XAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko JakovljevićXAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko Jakovljević
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8
 
Android Button
Android ButtonAndroid Button
Android Button
 
Session 5#
Session 5#Session 5#
Session 5#
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation
 
Sencha touch
Sencha touchSencha touch
Sencha touch
 
Visual studio.net
Visual studio.netVisual studio.net
Visual studio.net
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
netmind - Primer Contacto con el Desarrollo de Aplicaciones para Windows 8
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
 

More from QIRIS

[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache luceneQIRIS
 
Francesco Inguscio - Start-up financing from the side of the entrepreneur
Francesco Inguscio - Start-up financing from the side of the entrepreneurFrancesco Inguscio - Start-up financing from the side of the entrepreneur
Francesco Inguscio - Start-up financing from the side of the entrepreneurQIRIS
 
Monica Maria Crapanzano - Definire business model e business plan
Monica Maria Crapanzano - Definire business model e business planMonica Maria Crapanzano - Definire business model e business plan
Monica Maria Crapanzano - Definire business model e business planQIRIS
 
Massimo Aliberti - Dal concept al prototipo al prodotto
Massimo Aliberti - Dal concept al prototipo al prodottoMassimo Aliberti - Dal concept al prototipo al prodotto
Massimo Aliberti - Dal concept al prototipo al prodottoQIRIS
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingQIRIS
 
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications QIRIS
 
follow-app: BOOTCAMP 3 - Introduzione al GTUG
follow-app: BOOTCAMP 3 - Introduzione al GTUGfollow-app: BOOTCAMP 3 - Introduzione al GTUG
follow-app: BOOTCAMP 3 - Introduzione al GTUGQIRIS
 
follow-app DAY 4: Dati, segreti e tecniche per App di successo
follow-app DAY 4: Dati, segreti e tecniche per App di successofollow-app DAY 4: Dati, segreti e tecniche per App di successo
follow-app DAY 4: Dati, segreti e tecniche per App di successoQIRIS
 
follow-ap DAY 4: HTML5 e jQuery
follow-ap DAY 4: HTML5 e jQueryfollow-ap DAY 4: HTML5 e jQuery
follow-ap DAY 4: HTML5 e jQueryQIRIS
 
follow-app DAY 2: Dall'idea al mercato
follow-app DAY 2: Dall'idea al mercatofollow-app DAY 2: Dall'idea al mercato
follow-app DAY 2: Dall'idea al mercatoQIRIS
 
follow-app DAY 3: Marketing & Sales
follow-app DAY 3: Marketing & Salesfollow-app DAY 3: Marketing & Sales
follow-app DAY 3: Marketing & SalesQIRIS
 
follow-app DAY 2: Risorse utili
follow-app DAY 2: Risorse utilifollow-app DAY 2: Risorse utili
follow-app DAY 2: Risorse utiliQIRIS
 
follow-app DAY 1: Cosa vuol dire essere imprenditore
follow-app DAY 1: Cosa vuol dire essere imprenditorefollow-app DAY 1: Cosa vuol dire essere imprenditore
follow-app DAY 1: Cosa vuol dire essere imprenditoreQIRIS
 
dbGLOVE (presentation at Silicon Valley Personal Health Technology)
dbGLOVE (presentation at Silicon Valley Personal Health Technology)dbGLOVE (presentation at Silicon Valley Personal Health Technology)
dbGLOVE (presentation at Silicon Valley Personal Health Technology)QIRIS
 

More from QIRIS (14)

[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene
[F5 Hit Refresh] Pierpaolo Basile - Accesso alle informazioni con apache lucene
 
Francesco Inguscio - Start-up financing from the side of the entrepreneur
Francesco Inguscio - Start-up financing from the side of the entrepreneurFrancesco Inguscio - Start-up financing from the side of the entrepreneur
Francesco Inguscio - Start-up financing from the side of the entrepreneur
 
Monica Maria Crapanzano - Definire business model e business plan
Monica Maria Crapanzano - Definire business model e business planMonica Maria Crapanzano - Definire business model e business plan
Monica Maria Crapanzano - Definire business model e business plan
 
Massimo Aliberti - Dal concept al prototipo al prodotto
Massimo Aliberti - Dal concept al prototipo al prodottoMassimo Aliberti - Dal concept al prototipo al prodotto
Massimo Aliberti - Dal concept al prototipo al prodotto
 
follow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switchingfollow-app BOOTCAMP 2: Windows phone fast application switching
follow-app BOOTCAMP 2: Windows phone fast application switching
 
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
follow-app BOOTCAMP 2 - Windows Phone: Tiles and Notifications
 
follow-app: BOOTCAMP 3 - Introduzione al GTUG
follow-app: BOOTCAMP 3 - Introduzione al GTUGfollow-app: BOOTCAMP 3 - Introduzione al GTUG
follow-app: BOOTCAMP 3 - Introduzione al GTUG
 
follow-app DAY 4: Dati, segreti e tecniche per App di successo
follow-app DAY 4: Dati, segreti e tecniche per App di successofollow-app DAY 4: Dati, segreti e tecniche per App di successo
follow-app DAY 4: Dati, segreti e tecniche per App di successo
 
follow-ap DAY 4: HTML5 e jQuery
follow-ap DAY 4: HTML5 e jQueryfollow-ap DAY 4: HTML5 e jQuery
follow-ap DAY 4: HTML5 e jQuery
 
follow-app DAY 2: Dall'idea al mercato
follow-app DAY 2: Dall'idea al mercatofollow-app DAY 2: Dall'idea al mercato
follow-app DAY 2: Dall'idea al mercato
 
follow-app DAY 3: Marketing & Sales
follow-app DAY 3: Marketing & Salesfollow-app DAY 3: Marketing & Sales
follow-app DAY 3: Marketing & Sales
 
follow-app DAY 2: Risorse utili
follow-app DAY 2: Risorse utilifollow-app DAY 2: Risorse utili
follow-app DAY 2: Risorse utili
 
follow-app DAY 1: Cosa vuol dire essere imprenditore
follow-app DAY 1: Cosa vuol dire essere imprenditorefollow-app DAY 1: Cosa vuol dire essere imprenditore
follow-app DAY 1: Cosa vuol dire essere imprenditore
 
dbGLOVE (presentation at Silicon Valley Personal Health Technology)
dbGLOVE (presentation at Silicon Valley Personal Health Technology)dbGLOVE (presentation at Silicon Valley Personal Health Technology)
dbGLOVE (presentation at Silicon Valley Personal Health Technology)
 

Recently uploaded

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

follow-app BOOTCAMP 2: Introduction to silverlight

  • 2. Topics  The Metro design style  Silverlight Components  Creating a Silverlight Application  Silverlight and XAML  Introduction to Silverlight Layout  Components and Events  Silverlight Project Templates  ApplicationBar  Page Navigation 2 Windows Phone
  • 4. Windows Phone and Metro  To make life easier for us the Metro style is “baked in” to the Windows developer tools  The default appearance, behaviour and fonts of the user elements all match the style  If you want to find out more about Metro on phone you can read the “User Experience Design Guidelines” http://msdn.microsoft.com/en- us/library/hh202915.aspx 4 Windows Phone
  • 5. Tools for the job: Graphical Design  Great design separates the graphical design aspects from the programming  The designer works on the look and feel of the application  The programmer implements the required behaviours  Silverlight is designed to support this  A Silverlight designer can use the “Expression Blend” to specify the appearance of the user interface  A version of Blend for the phone is supplied as part of the phone SDK 5 Windows Phone 5
  • 6. Metro Templates and Components  Visual Studio provides a set of Metro project templates  Each of them maps onto a particular style of application 6 Windows Phone 6
  • 7. Application Types and Templates  The three application types provide quite different user experiences  Select the one that you feel is the most appropriate 7 Windows Phone 7
  • 8. Silverlight display elements  Application title  Page title  First number  Plus text  Second number  Equals button  Result text 8 Windows Phone 8
  • 9. Silverlight element class hierarchy FrameworkElement  The Silverlight class hierarchy is quite complex TextBlock Control  Everything is based on the FrameworkElement class which contains the fundamental properties TextBox ContentControl of all elements  You can derive your own components if you wish ButtonBase Button 9 Windows Phone 9
  • 10. Elements in AddingMachine  The adding machine actually contains three different types of Silverlight display element  TextBox  Used to receive user input from the keyboard  TextBlock  Used to display messages to the user  Button  Used to cause events in the application 1 Windows Phone 10 0
  • 11. Elements and XAML <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBox Height="72" HorizontalAlignment="Left" Margin="8,19,0,0" Name="firstNumberTextBox" Text="0" VerticalAlignment="Top" Width="460" TextAlignment="Center" /> . . . <Button Content="equals" Height="72" HorizontalAlignment="Left" Margin="158,275,0,0" Name="equalsButton" VerticalAlignment="Top" Width="160" Click="equalsButton_Click" /> . . . </Grid>  XAML is the markup language that describes the Silverlight UI components 1 Windows Phone 11 1
  • 12. Grid container element <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBox Height="72" HorizontalAlignment="Left" Margin="8,19,0,0" Name="firstNumberTextBox" Text="0" VerticalAlignment="Top" Width="460" TextAlignment="Center" /> . . . <Button Content="equals" Height="72" HorizontalAlignment="Left" Margin="158,275,0,0" Name="equalsButton" VerticalAlignment="Top" Width="160" Click="equalsButton_Click" /> . . . </Grid>  Grid is a container into which you can position display elements 1 Windows Phone 12 2
  • 13. TextBox element <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBox Height="72" HorizontalAlignment="Left" Margin="8,19,0,0" Name="firstNumberTextBox" Text="0" VerticalAlignment="Top" Width="460" TextAlignment="Center" /> . . . <Button Content="equals" Height="72" HorizontalAlignment="Left" Margin="158,275,0,0" Name="equalsButton" VerticalAlignment="Top" Width="160" Click="equalsButton_Click" /> . . . </Grid>  TextBox is used for text entry  TextBlock can be used for text display 1 Windows Phone 13 3
  • 14. Button element <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBox Height="72" HorizontalAlignment="Left" Margin="8,19,0,0" Name="firstNumberTextBox" Text="0" VerticalAlignment="Top" Width="460" TextAlignment="Center" /> . . . <Button Content="equals" Height="72" HorizontalAlignment="Left" Margin="158,275,0,0" Name="equalsButton" VerticalAlignment="Top" Width="160" Click="equalsButton_Click" /> . . . </Grid>  Button is used for user actions and generates events when activated 1 Windows Phone 14 4
  • 15. Button element <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <TextBox Height="72" HorizontalAlignment="Left" Margin="8,19,0,0" Name="firstNumberTextBox" Text="0" VerticalAlignment="Top" Width="460" TextAlignment="Center" /> . . . <Button Content="equals" Height="72" HorizontalAlignment="Left" Margin="158,275,0,0" Name="equalsButton" VerticalAlignment="Top" Width="160" Click="equalsButton_Click" /> . . . </Grid>  Click is the button clicked event which is bound to the method specified 1 Windows Phone 15 5
  • 16. Button click event handler private void equalsButton_Click(object sender, RoutedEventArgs e) { float v1 = float.Parse(firstNumberTextBox.Text); float v2 = float.Parse(secondNumberTextBox.Text); float result = v1 + v2; resultTextBlock.Text = result.ToString(); }  The event hander for the button takes the values out of the textboxes, parses them and then calculates and displays the result 1 Windows Phone 16 6
  • 17. Demo Demo 1: The Silverlight Adding Machine 17
  • 18. Best Practice: Keyboard use  It is best if the user can still press the equals button when the keyboard is displayed  This means the equals button should be moved up the screen 1 Windows Phone 18 8
  • 19. Selecting Orientations SupportedOrientations="Portrait" SupportedOrientations="PortraitOrLandscape"  A XAML property for the phone application page lets you select the orientation options available  Your application can bind to an event which is fired when the orientation changes 1 Windows Phone 19 9
  • 20. Using a StackPanel <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <StackPanel> <TextBox Height="72" HorizontalAlignment="Center" .../> <TextBlock Height="56" HorizontalAlignment="Center" .../> <TextBox Height="72" HorizontalAlignment="Center" .../> <Button Content="equals" Height="72" ...> <TextBlock Height="46" HorizontalAlignment="Center" .../> </StackPanel> </Grid>  To automatically handle orientation change we can use a StackPanel container that will stack the display components 2 Windows Phone 20 0
  • 22. Handling errors try { v1 = float.Parse(firstNumberTextBox.Text); v2 = float.Parse(secondNumberTextBox.Text); } catch { MessageBox.Show("Invalid number"); return; }  A program can catch errors as on the desktop  There is also a MessageBox mechanism as well 2 Windows Phone 22 2
  • 23. Configuring the input scope <TextBox InputScope="Number" ...  If all you want from the user is a number it is dangerous to allow them to enter text as well  You can add to the XAML to specify that the keyboard only accepts numbers 2 Windows Phone 23 3
  • 26. Application Chrome System Tray and Application Bar  System Tray  System owned indicator area that displays system-level status information  Apps can show/hide  Microsoft.Phone.Shell.SystemTray. IsVisible = false;  Application Bar  Area where applications can display buttons for the most common tasks  Can display pop-up menu for less common tasks 2 Windows Phone 26 6
  • 28. Application Bar in Xaml <phone:PhoneApplicationPage x:Class=“MyApp.MainPage” … > <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar x:Name="AppBar" IsMenuEnabled="True"> <shell:ApplicationBar.Buttons> <shell:ApplicationBarIconButton x:Name="NewContactButton" IconUri="Images/appbar.new.rest.png" Text="New" Click="NewContactButton_Click"/> <shell:ApplicationBarIconButton x:Name="SearchButton" IconUri="Images/appbar.feature.search.rest.png" Text="Find" Click="SearchButton_Click"/> </shell:ApplicationBar.Buttons> <shell:ApplicationBar.MenuItems> <shell:ApplicationBarMenuItem x:Name="GenerateMenuItem" Text="Generate Data" Click="GenerateMenuItem_Click" /> <shell:ApplicationBarMenuItem x:Name="ClearMenuItem" Text="Clear Data" Click="ClearMenuItem_Click" /> </shell:ApplicationBar.MenuItems> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar> 2 Windows Phone 28 8
  • 29. App Bar & Landscape 2 Windows Phone 9
  • 31. Frame and Page  Frame  Top-level container control  PhoneApplicationFrame class  Contains the page control and system elements such as system tray and application bar  Page  Fills the entire content region of the frame  PhoneApplicationPage-derived class  Contains a title  Optionally surfaces its own application bar 3 Windows Phone 1
  • 32. Page Navigation  Silverlight on Windows Phone uses a Page-based navigation model  Similar to web page model  Each page identified by a URI  Each page is essentially stateless private void hyperlinkButton1_Click( object sender, RoutedEventArgs e) { NavigationService.Navigate( new Uri("/SecondPage.xaml", UriKind.RelativeOrAbsolute) ); } 3 Windows Phone 2
  • 33. Navigating Back  Application can provide controls to navigate back to preceding page private void button1_Click( object sender, RoutedEventArgs e) { NavigationService.GoBack(); }  The hardware Back key will also navigate back to preceding page  No code required – built-in behaviour 3 Windows Phone 3
  • 34. Demo ApplicationBar, Page Navigation and Pivot Control 34
  • 35. Review  Windows Phone applications use Silverlight to express the design of their user interface  The design is expressed in a XAML text file that identifies and configures display elements  Elements can also be manipulated as code objects  There are a set of Silverlight templates for applications and elements based on the Metro design  You can create multiple Silverlight pages and add them to your project  Navigation to pages is performed on the basis of uri (Uniform Resource Indicator) values  The back button normally navigates back to the source page, but this can be overridden  The uri can contain simple text messages  Pages can share larger objects in the App.xaml page 3 Windows Phone 35 5
  • 36. Bonus (and really good to know)
  • 37. Silverlight Toolkit for Windows Phone the Microsoft Silverlight team A product of  The Silverlight Toolkit adds tons of additional controls ‘out of band’ from the official product control set  Includes full open source code, samples, documentation, and design- time support for controls  Refresh every 3 months or so  Bug fixes  New controls  http://silverlight.codeplex.com 3 7
  • 38. NuGet  Package management system for .NET  Simplifies incorporating 3rd party libraries  Developer focused  Free, open source  Install NuGet using the Visual Studio Extension Manager  Use NuGet to add libraries such as the Silverlight Toolkit to your project 3 Windows Phone 8