SlideShare una empresa de Scribd logo
1 de 13
DllImport "avicap32.dll"            "capCreateCaptureWindow"
static extern int
  string                  int
  int    int    int           int
  int             int

 DllImport "avicap32.dll"
static extern bool
  int
   MarshalAs UnmanagedType          ref string
  int
   MarshalAs UnmanagedType          ref string
  int

// more and more of the same
using Windows.Media.Capture;

var         new CameraCaptureUI
                                         new Size

var           await                     CameraCaptureUIMode

if

      var             new BitmapImage
                          await              FileAccessMode
Windows 8 for the .NET developer
Windows 8 for the .NET developer
Windows 8 for the .NET developer
Windows 8 for the .NET developer

Más contenido relacionado

Destacado

Raids d'aventura
Raids d'aventuraRaids d'aventura
Raids d'aventura
tonimuni
 
Espm respostas
Espm respostasEspm respostas
Espm respostas
Pedroguma
 
Coleção Cris Barros para Riachuelo
Coleção Cris Barros para RiachueloColeção Cris Barros para Riachuelo
Coleção Cris Barros para Riachuelo
rmdonno
 
Presentación propuestas final
Presentación propuestas finalPresentación propuestas final
Presentación propuestas final
gcaro_rvan
 
Períodos e campos de investigação da filosofia grega
Períodos e campos de investigação da filosofia gregaPeríodos e campos de investigação da filosofia grega
Períodos e campos de investigação da filosofia grega
Reginaldo Pereira do Carmo
 
Angel O Amigo
Angel O AmigoAngel O Amigo
Angel O Amigo
Helena35
 
O sistema solar grupo 2
O sistema solar grupo 2O sistema solar grupo 2
O sistema solar grupo 2
Paula Branco
 

Destacado (18)

Raids d'aventura
Raids d'aventuraRaids d'aventura
Raids d'aventura
 
Guia do web marketing
Guia do web marketingGuia do web marketing
Guia do web marketing
 
Espm respostas
Espm respostasEspm respostas
Espm respostas
 
Mulher presbiteriana
Mulher presbiterianaMulher presbiteriana
Mulher presbiteriana
 
Coleção Cris Barros para Riachuelo
Coleção Cris Barros para RiachueloColeção Cris Barros para Riachuelo
Coleção Cris Barros para Riachuelo
 
Cão guia
Cão guiaCão guia
Cão guia
 
Caso 6
Caso 6Caso 6
Caso 6
 
Com 310 cp 3
Com 310 cp 3Com 310 cp 3
Com 310 cp 3
 
Evaluando GNOME
Evaluando GNOMEEvaluando GNOME
Evaluando GNOME
 
Quase
QuaseQuase
Quase
 
Presentación propuestas final
Presentación propuestas finalPresentación propuestas final
Presentación propuestas final
 
Internet Archive Url Mp3
Internet Archive Url Mp3Internet Archive Url Mp3
Internet Archive Url Mp3
 
Ensaio
EnsaioEnsaio
Ensaio
 
Períodos e campos de investigação da filosofia grega
Períodos e campos de investigação da filosofia gregaPeríodos e campos de investigação da filosofia grega
Períodos e campos de investigação da filosofia grega
 
Aquecimwnto globalt1
Aquecimwnto globalt1Aquecimwnto globalt1
Aquecimwnto globalt1
 
As crises da economia capitalista em portugal
As crises da economia capitalista em portugalAs crises da economia capitalista em portugal
As crises da economia capitalista em portugal
 
Angel O Amigo
Angel O AmigoAngel O Amigo
Angel O Amigo
 
O sistema solar grupo 2
O sistema solar grupo 2O sistema solar grupo 2
O sistema solar grupo 2
 

Más de Robert MacLean

Más de Robert MacLean (20)

14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
 
Git
GitGit
Git
 
OWASP TOP 10
OWASP TOP 10OWASP TOP 10
OWASP TOP 10
 
Building a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCP
 
Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
 
Kotlin 101
Kotlin 101Kotlin 101
Kotlin 101
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
 
LightSwitch
LightSwitchLightSwitch
LightSwitch
 
How to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutesHow to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutes
 
Protection of Personal Information Bill (POPI)
Protection of Personal Information Bill (POPI)Protection of Personal Information Bill (POPI)
Protection of Personal Information Bill (POPI)
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Windows 8 for the .NET developer

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. DllImport "avicap32.dll" "capCreateCaptureWindow" static extern int string int int int int int int int DllImport "avicap32.dll" static extern bool int MarshalAs UnmanagedType ref string int MarshalAs UnmanagedType ref string int // more and more of the same
  • 9. using Windows.Media.Capture; var new CameraCaptureUI new Size var await CameraCaptureUIMode if var new BitmapImage await FileAccessMode

Notas del editor

  1. PrepVisual Studio 11 loadedDemoNew Metro project. Discuss templates.Add some content. Talk about design & C shape. Do some in XAML. Set style in property drag on button. <Grid Background="{StaticResourceApplicationPageBackgroundBrush}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="120"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="120"/> <RowDefinition /> <RowDefinition Height="120"/> </Grid.RowDefinitions> <TextBlockGrid.Column="1" Grid.Row="0" Text="Community Night" Style="{StaticResourcePageHeaderTextStyle}" /> <Button Content="Demo 1" Grid.Column="1" HorizontalAlignment="Left" Margin="189,132,0,0" Grid.Row="1" VerticalAlignment="Top" Width="115" Style="{StaticResourceTextButtonStyle}"/> </Grid>Code behind for buttonnew MessageDialog("Welcome to Windows 8!", "Community Night").ShowAsync(); Run, then run in emulatorLook at the code and talk async for a bit.Demo 2Add another buttonCode behind – talk async. Talk pickers. Show picking from photosprivate async void Button_Click_2(object sender, RoutedEventArgs e) {var picker = new Windows.Storage.Pickers.FileOpenPicker();picker.FileTypeFilter.Add(".jpg");picker.FileTypeFilter.Add(".png");picker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary;picker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail;var result = await picker.PickSingleFileAsync(); await new MessageDialog(string.Format("You picked {0}", result.DisplayName)).ShowAsync(); }Demo 3 – new button again. Add following, break, show manifest talk about settings and permissions. Fix run show settings. private async void Button_Click_3(object sender, RoutedEventArgs e) {vargps = new Windows.Devices.Geolocation.Geolocator();var location = await gps.GetGeopositionAsync(); await new MessageDialog(string.Format("You picked at {0}-{1}", location.Coordinate.Latitude, location.Coordinate.Longitude)).ShowAsync(); }Demo 4 needs a textbox and a buttonprivate void Button_Click_4(object sender, RoutedEventArgs e) {var text = blah.Text;var manager = DataTransferManager.GetForCurrentView();manager.DataRequested += (s, args) => {args.Request.Data.Properties.Title = "From Community Night";args.Request.Data.SetText(text); };DataTransferManager.ShowShareUI(); }Demo 5 – Add search contract demo page and show the tie in