Microsoft Corporation http://www.jeff.wilcox.name/ - - PowerPoint PPT Presentation

microsoft corporation http jeff wilcox name
SMART_READER_LITE
LIVE PREVIEW

Microsoft Corporation http://www.jeff.wilcox.name/ - - PowerPoint PPT Presentation

Microsoft Corporation http://www.jeff.wilcox.name/ 2 3 Multimedia Display Codec acceleration 480x800 QVGA Other resolutions in the future Capacitive


slide-1
SLIDE 1

Microsoft Corporation http://www.jeff.wilcox.name/

slide-2
SLIDE 2
  • 2
slide-3
SLIDE 3
  • 3
slide-4
SLIDE 4

4

Display

480x800 QVGA

Other resolutions in the future

Capacitive touch

4+ contact points

Camera

5+ megapixels

Hardware buttons

Start, Search, Back

GPU

DirectX 9 acceleration

CPU

ARMv7

Memory

256MB RAM or more 8GB Flash or more

Multimedia

Codec acceleration

Sensors

A-GPS, Accelerometer, Compass, Light

slide-5
SLIDE 5
  • 5
slide-6
SLIDE 6

6

slide-7
SLIDE 7
  • 8
slide-8
SLIDE 8
  • 9
slide-9
SLIDE 9
  • 10

<Grid> <TextBox Text=“Hello World" TextChanged=“MyMessageChangedHandler"/> </Grid>

slide-10
SLIDE 10
  • 11
slide-11
SLIDE 11
  • 13

<Style TargetType="TextBlock" x:Key="SubHeadingText"> <Setter Property="FontSize” Value="42" /> <Setter Property="Foreground“ Value="Blue" /> </Style> <TextBlock Text=“What’s up?“ Style=“{StaticResource SubHeadingText}“/>

slide-12
SLIDE 12
  • 14
slide-13
SLIDE 13
  • 15

<TextBlock Text=“{Binding Name}” Foreground=“{Binding Name, Converter={StaticResource MyPersonForegroundBrushSelector}}” />

slide-14
SLIDE 14
  • link
  • 16

// Bad for performance NotifyPropertyChanged(()=> FullName); // Good NotifyPropertyChanged(“FullName”); // Great NotifyPropertyChanged(PropertyFullName);

slide-15
SLIDE 15
  • 17
slide-16
SLIDE 16

18

slide-17
SLIDE 17
  • 19
slide-18
SLIDE 18
  • 20
slide-19
SLIDE 19
  • 21
slide-20
SLIDE 20
  • 22
slide-21
SLIDE 21

24

slide-22
SLIDE 22
  • link

25

slide-23
SLIDE 23
  • 26
slide-24
SLIDE 24

27

<ListBox.ItemTemplate> <DataTemplate> <StackPanel> <StackPanel Orientation="Horizontal"> <Image Source="{Binding PicSource}" Width="{Binding ApproxWidth}"/> <controls:MyPresenceControl User="{Binding}" OnlineText="{Binding ElementName=Resources, Path=UserOnline, Conve rter={StaticResource CurrentCultureConverter}}"/> <TextBlock Text="{Binding Name}" Foreground="{Binding Name, Converter={StaticResource MyNameForegro undConverter}, ConverterParameter='Red,Blue'}"/> </StackPanel> </StackPanel> </DataTemplate> </ListBox.ItemTemplate>

slide-25
SLIDE 25
  • 28

<ListBox.ItemTemplate> <DataTemplate> <Grid Height="180"> <Grid.ColumnDefinitions> <ColumnDefinition Width="120"/> <ColumnDefinition Width="80"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Image Source="{Binding PicSource}" Width="110" Height="110"/> <Image Source="{Binding PresencePic}" Width="70" Height="30" Grid.Column="1" Visibility="{Binding PresenceVisible}"/> <!-- clipped for space -->

slide-26
SLIDE 26
  • 29

<ListBox> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel/> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox>

slide-27
SLIDE 27

30

slide-28
SLIDE 28

31

slide-29
SLIDE 29
  • 32
slide-30
SLIDE 30
  • 33
slide-31
SLIDE 31
  • 34
slide-32
SLIDE 32
  • 35
slide-33
SLIDE 33
  • 36

private void Dispatch(Action action) { // No need for a dispatcher invoke, this will be quicker. if (Dispatcher.CheckAccess()) { action(); } else { Dispatcher.BeginInvoke(action); } }

slide-34
SLIDE 34
  • 37
slide-35
SLIDE 35

38

BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += BackgroundWork; bw.RunWorkerCompleted += (x, xe) => { // This is called on the UI thread }; bw.RunWorkerAsync(); private void BackgroundWork(object sender, DoWorkEventArgs e) { // This is where your background magic happens. }

slide-36
SLIDE 36

39

slide-37
SLIDE 37
  • 40

<Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="180"/> </Grid.RowDefinitions> <MediaElement Grid.RowSpan="2" Source="/Intro.wmv" AutoPlay="True" Stretch="UniformToFill"/> <Grid Grid.Row="1" Background="Black" Opacity=".6"> <!-- Put playback controls here --> </Grid> </Grid>

slide-38
SLIDE 38
  • 41

MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher(); mediaPlayerLauncher.Media = new Uri(“Intro.wmv”, UriKind.Relative); mediaPlayerLauncher.Location = MediaLocationType.Data; mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause | MediaPlaybackControls.Stop; mediaPlayerLauncher.Show();

slide-39
SLIDE 39
  • 42
slide-40
SLIDE 40

43

slide-41
SLIDE 41

44

slide-42
SLIDE 42
  • 45

private void hyperlinkButton1_Click(

  • bject sender, RoutedEventArgs e)

{ NavigationService.Navigate( new Uri("/SecondPage.xaml", UriKind.RelativeOrAbsolute) ); }

slide-43
SLIDE 43
  • 46

private void button1_Click(

  • bject sender, RoutedEventArgs e)

{ NavigationService.GoBack(); }

slide-44
SLIDE 44

private void passParam_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new Uri("/SecondPage.xaml?msg=" + textBox1.Text, UriKind.Relative)); }

48

  • protected override void OnNavigatedTo(

System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); string msg = string.Empty; if (NavigationContext.QueryString.TryGetValue("msg", out msg)) textBlock1.Text = msg; }

slide-45
SLIDE 45
  • 49

NavigationService.Navigate( new Uri("/SecondPage.xaml+?Param=value" , UriKind.RelativeOrAbsolute

slide-46
SLIDE 46

50

slide-47
SLIDE 47
  • link

52

PortraitOrLandscape Portrait

slide-48
SLIDE 48

53

slide-49
SLIDE 49
  • 54
slide-50
SLIDE 50

System T ray and Application Bar

  • 55

SystemTray.IsVisible = false;

slide-51
SLIDE 51
slide-52
SLIDE 52
  • new Uri "http://www.bing.com/"

"<b>Hello JAOO Conference!</b>"

60

slide-53
SLIDE 53
  • 61
slide-54
SLIDE 54
  • 62
slide-55
SLIDE 55

63

slide-56
SLIDE 56
  • 64
slide-57
SLIDE 57

65

slide-58
SLIDE 58
  • 66

Pivot Panorama

slide-59
SLIDE 59

67

slide-60
SLIDE 60
  • 68
slide-61
SLIDE 61
  • 69
slide-62
SLIDE 62
  • 70
slide-63
SLIDE 63
  • 71
slide-64
SLIDE 64
  • 72
slide-65
SLIDE 65
  • 73
slide-66
SLIDE 66
  • link
  • 74
slide-67
SLIDE 67
  • 75

var deviceMem=(long)DeviceExtendedProperties.GetValue("DeviceTotalMemory"); var app=(long)DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage"); var appPeak=(long)DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage"); var managedMemory = GC.GetTotalMemory(false);

slide-68
SLIDE 68
  • link
  • 76
slide-69
SLIDE 69

77

slide-70
SLIDE 70
  • 78
slide-71
SLIDE 71
  • 79
slide-72
SLIDE 72
  • 80
slide-73
SLIDE 73

81

slide-74
SLIDE 74
  • 82
slide-75
SLIDE 75
  • 83
slide-76
SLIDE 76

84

Not running Launching Running Closing

User exits the application (press back from the first page) – Closing event User Starts the application – Launching Event

slide-77
SLIDE 77

85

Running

Deactivated

Tombstoned (in most cases)

Activated

The application’s process is killed (in most cases)*

Save state for later use Load state to continue where she left off User is back where she left off

  • Press Start
  • Open toast
  • Lock screen
slide-78
SLIDE 78
  • 86
slide-79
SLIDE 79
  • State

PhoneApplicationPage

  • 91
slide-80
SLIDE 80

92

slide-81
SLIDE 81
  • 93
slide-82
SLIDE 82

95

Launchers

  • PhoneCallTask
  • SearchTask
  • SMSComposeTask
  • WebBrowserTask
  • EmailComposeTask
  • MarketplaceDetailTask
  • MarketplaceHubTask
  • MarketplaceReviewTask
  • MarketplaceSearchTask
  • MediaPlayerLauncher

Choosers

  • CameraCaptureTask
  • EmailAddressChooserTask
  • PhoneNumberChooserTask
  • PhotoChooserTask
  • SaveEmailAddressTask
  • SavePhoneNumberTask
slide-83
SLIDE 83

96

slide-84
SLIDE 84

98

// Declare the PhotoChooserTask object with page scope.

slide-85
SLIDE 85

102

slide-86
SLIDE 86
  • 103
slide-87
SLIDE 87
  • 104
slide-88
SLIDE 88

105

slide-89
SLIDE 89
  • http://developer.windowsphone.com/
  • http://silverlight.codeplex.com/
  • http://www.jeff.wilcox.name/

jwilcox@microsoft.com

106

slide-90
SLIDE 90