SlideShare a Scribd company logo
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
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
#win8acad : Building Metro Style Apps with XAML for .NET Developers
using Windows.Media.Capture;

var         new CameraCaptureUI
                                       new Size

var          await                     CameraCaptureUIMode

if

      var            new BitmapImage
                         await              FileAccessMode
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
demo
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
demo
var         new CameraCaptureUI
                                       new Size

var          await                     CameraCaptureUIMode

if

      var            new BitmapImage
                         await              FileAccessMode
var             DataTransferManager.GetForCurrentView

                           new TypedEventHandler<DataTransferManager
              DataRequestedEventArgs


void


       if                null
                                               "No Image Taken"
       else
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
try
{
   var     new CameraCaptureUI
                                 new Size

catch (Exception e)
{
   //Exception handling code
}
                                            ComException
var picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*");
var files = await picker.PickMultipleFilesAsync();
foreach (var file in files)
{
    lbFiles.Items.Add(file.FileName);
}
         PickMultipleFilesOperation PickMultipleFilesAsync();


    public sealed class PickMultipleFilesOperation :
      IAsyncOperation<IReadOnlyList<StorageFile>>, IAsyncInfo
var picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*");
var files = await picker.PickMultipleFilesAsync();
foreach (StorageFile file in files)
{
    lbFiles.Items.Add(file.FileName);
}
                 System.Collections.Generic.IReadOnlyList
                     <Windows.Storage.StorageFile>
var picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*");
var files = await picker.PickMultipleFilesAsync();
foreach (StorageFile file in files)
{
    lbFiles.Items.Add(file.FileName);
}
                 System.Collections.Generic.IReadOnlyList
                 Windows.Foundation.Collections.IVectorView
                     <Windows.Storage.StorageFile>
                     <Windows.Storage.StorageFile>
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add("*");

StorageFile file = await picker.PickSingleFileAsync();


Windows.Storage.Streams.IInputStream inputStream =
    await file.OpenForReadAsync();


System.IO.Stream stream = inputStream.AsStream();
System.IO.StreamReader reader = new StreamReader(stream);

string contents = reader.ReadToEnd();
internal async void ProtectBytes(byte[] data, BinaryWriter output)
{
   DataProtectionProvider dpp = new DataProtectionProvider();

    IBuffer result = await dpp.ProtectAsync(data.AsBuffer());
    byte[] protectedData;
    int start = 0;
    if (result.TryGetUnderlyingData(out protectedData, out start))
       output.Write(protectedData);
    else
       throw new InvalidOperationException();
}
#win8acad : Building Metro Style Apps with XAML for .NET Developers
ComVisible(true), Guid("06D7901C-9045-4241-B8A0-39A1AC0F8618")]
public interface IWindowsApiSample
{
    string HelloWorld();
}

[ComVisible(true), [ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(IWindowsApiSample))]
public class WindowsApiSample : IWindowsApiSample
{
    public string HelloWorld() {
         return "Hello, World!";
    }
}
public sealed class MyClassLibrary
{
    public string HelloWorld()
    {
         return "Hello, World!";
    }
}
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
demo
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
var




 var
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
demo
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
demo
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers
#win8acad : Building Metro Style Apps with XAML for .NET Developers

More Related Content

PPTX
Xitrum internals
PDF
Fetch data from form
PPTX
Conociendo el consumo de datos en Windows Phone 8.1
PPTX
13 networking, mobile services, and authentication
TXT
Birhanu distributive assignment
PPTX
Coding using jscript test complete
DOCX
Service Functions
Xitrum internals
Fetch data from form
Conociendo el consumo de datos en Windows Phone 8.1
13 networking, mobile services, and authentication
Birhanu distributive assignment
Coding using jscript test complete
Service Functions

What's hot (20)

PPTX
#3 (Multi Threads With TCP)
PDF
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
PPT
Wicket Security Presentation
PDF
Nestjs MasterClass Slides
PPTX
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
PDF
Forgive me for i have allocated
PPTX
20131004 - Sq lite sample by Jax
PDF
End to end todo list app with NestJs - Angular - Redux & Redux Saga
PPTX
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
PDF
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
PDF
Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013
PPTX
ATG Advanced RQL
PDF
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
PDF
Streaming using Kafka Flink & Elasticsearch
PPTX
Azure Web Camp : Cache Distribué
PDF
NestJS
PDF
Tomcat连接池配置方法V2.1
PPTX
Unit testing CourseSites Apache Filter
PDF
Servlet Filter
PPTX
Metaprogramming in .NET
#3 (Multi Threads With TCP)
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
Wicket Security Presentation
Nestjs MasterClass Slides
[AzureCamp 24 Juin 2014] Cache Distribué par Thomas Conté
Forgive me for i have allocated
20131004 - Sq lite sample by Jax
End to end todo list app with NestJs - Angular - Redux & Redux Saga
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
Data Loading Made Easy with Mike Nakhimovich DroidCon Italy 2017
Talk about Testing at vienna.rb meetup #2 on Apr 12th, 2013
ATG Advanced RQL
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Streaming using Kafka Flink & Elasticsearch
Azure Web Camp : Cache Distribué
NestJS
Tomcat连接池配置方法V2.1
Unit testing CourseSites Apache Filter
Servlet Filter
Metaprogramming in .NET
Ad

Viewers also liked (15)

PDF
Yu-Hsiu Li Design as one UXMY
PDF
#win8acad : Building a Windows 8 Metro Style UI
PPTX
Automating Your Microsoft Azure Environment (DevLink 2014)
PDF
Metro UI interaction design guidelines @Microsoft Tech.Days 2011
PDF
[Azure Council Experts (ACE) 第5回定例会] Microsoft Azureアップデート情報 (2014/04/16-2014...
PPTX
BIH - Human Centered Design
PDF
Microsoft Design principles and UI
PDF
Flat Design. Microsoft Story
PPTX
Getting started with microsoft azure in 30 mins
PPTX
Azure Data Lake Analytics Deep Dive
PDF
LinkedIn Data Infrastructure (QCon London 2012)
PPTX
Azure Cloud PPT
PDF
ZeroMQ with NodeJS
PDF
Microsoft to Acquire LinkedIn: Overview for Investors
PDF
Introducing Apple Watch
Yu-Hsiu Li Design as one UXMY
#win8acad : Building a Windows 8 Metro Style UI
Automating Your Microsoft Azure Environment (DevLink 2014)
Metro UI interaction design guidelines @Microsoft Tech.Days 2011
[Azure Council Experts (ACE) 第5回定例会] Microsoft Azureアップデート情報 (2014/04/16-2014...
BIH - Human Centered Design
Microsoft Design principles and UI
Flat Design. Microsoft Story
Getting started with microsoft azure in 30 mins
Azure Data Lake Analytics Deep Dive
LinkedIn Data Infrastructure (QCon London 2012)
Azure Cloud PPT
ZeroMQ with NodeJS
Microsoft to Acquire LinkedIn: Overview for Investors
Introducing Apple Watch
Ad

Similar to #win8acad : Building Metro Style Apps with XAML for .NET Developers (20)

PPTX
WinRT Holy COw
PPTX
10 sharing files and data in windows phone 8
PPTX
OpenCMIS Part 1
PDF
Change the code in Writer.java only to get it working. Must contain .pdf
PDF
Writing Swift code with great testability
PPT
Java Input Output and File Handling
PDF
Android Studio Assignment HelpCan someone who is familiar with And.pdf
DOCX
DOCX
Code red SUM
KEY
Android workshop
PDF
Taming Core Data by Arek Holko, Macoscope
PPT
Java căn bản - Chapter12
PPT
Chapter 12 - File Input and Output
PDF
Application-Specific Models and Pointcuts using a Logic Meta Language
PPTX
17 camera, media, and audio in windows phone 8.1
PDF
09.Local Database Files and Storage on WP
PDF
The java program that reads an input file input.txt an.pdf
DOC
Selenium Webdriver with data driven framework
PPTX
Windows 8 JavaScript (Wonderland)
PDF
JavaScript APIs - The Web is the Platform - .toster conference, Moscow
WinRT Holy COw
10 sharing files and data in windows phone 8
OpenCMIS Part 1
Change the code in Writer.java only to get it working. Must contain .pdf
Writing Swift code with great testability
Java Input Output and File Handling
Android Studio Assignment HelpCan someone who is familiar with And.pdf
Code red SUM
Android workshop
Taming Core Data by Arek Holko, Macoscope
Java căn bản - Chapter12
Chapter 12 - File Input and Output
Application-Specific Models and Pointcuts using a Logic Meta Language
17 camera, media, and audio in windows phone 8.1
09.Local Database Files and Storage on WP
The java program that reads an input file input.txt an.pdf
Selenium Webdriver with data driven framework
Windows 8 JavaScript (Wonderland)
JavaScript APIs - The Web is the Platform - .toster conference, Moscow

More from Frederik De Bruyne (18)

PDF
#win8acad : Tiles and notifications
PDF
#win8aca : How and when metro style apps run
PDF
#win8acad : Integrating the Windows 8 Experience with Contracts
PDF
#win8acad : Platform for Metro Style Apps
PDF
Microsoft Dynamics Academic Alliance: How to win future of business
PPTX
Microsoft Dynamics Academic Alliance: ERP in Training VDAB
PPTX
Microsoft Dynamics Academic Alliance: Partnership Next Steps
PPTX
Microsoft Dynamics Academic Alliance: Job Roles
PPTX
Microsoft Dynamics Academic Alliance: Academic Landscape
PPTX
Microsoft Dynamics Academic Alliance: Introduction
PPTX
Students to Business Day 2012: Alex Turner
PPTX
Students to Business Day 2012: Maarten Balliauw
PPTX
Students to Business Day 2012: Sas
PPTX
Students to Business Day 2012: Rob Miles
PPTX
Students to Business Day 2012: Giuliano Dore
PPTX
Students to Business Day 2012: Pieter Vanhees
PPTX
Students to Business Day 2012: Joe Wilson
PPTX
Students to Business Day 2012: Wouter Devinck
#win8acad : Tiles and notifications
#win8aca : How and when metro style apps run
#win8acad : Integrating the Windows 8 Experience with Contracts
#win8acad : Platform for Metro Style Apps
Microsoft Dynamics Academic Alliance: How to win future of business
Microsoft Dynamics Academic Alliance: ERP in Training VDAB
Microsoft Dynamics Academic Alliance: Partnership Next Steps
Microsoft Dynamics Academic Alliance: Job Roles
Microsoft Dynamics Academic Alliance: Academic Landscape
Microsoft Dynamics Academic Alliance: Introduction
Students to Business Day 2012: Alex Turner
Students to Business Day 2012: Maarten Balliauw
Students to Business Day 2012: Sas
Students to Business Day 2012: Rob Miles
Students to Business Day 2012: Giuliano Dore
Students to Business Day 2012: Pieter Vanhees
Students to Business Day 2012: Joe Wilson
Students to Business Day 2012: Wouter Devinck

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

#win8acad : Building Metro Style Apps with XAML for .NET Developers

  • 6. 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
  • 8. using Windows.Media.Capture; var new CameraCaptureUI new Size var await CameraCaptureUIMode if var new BitmapImage await FileAccessMode
  • 15. demo
  • 20. demo
  • 21. var new CameraCaptureUI new Size var await CameraCaptureUIMode if var new BitmapImage await FileAccessMode
  • 22. var DataTransferManager.GetForCurrentView new TypedEventHandler<DataTransferManager DataRequestedEventArgs void if null "No Image Taken" else
  • 25. try { var new CameraCaptureUI new Size catch (Exception e) { //Exception handling code } ComException
  • 26. var picker = new FileOpenPicker(); picker.FileTypeFilter.Add("*"); var files = await picker.PickMultipleFilesAsync(); foreach (var file in files) { lbFiles.Items.Add(file.FileName); } PickMultipleFilesOperation PickMultipleFilesAsync(); public sealed class PickMultipleFilesOperation : IAsyncOperation<IReadOnlyList<StorageFile>>, IAsyncInfo
  • 27. var picker = new FileOpenPicker(); picker.FileTypeFilter.Add("*"); var files = await picker.PickMultipleFilesAsync(); foreach (StorageFile file in files) { lbFiles.Items.Add(file.FileName); } System.Collections.Generic.IReadOnlyList <Windows.Storage.StorageFile>
  • 28. var picker = new FileOpenPicker(); picker.FileTypeFilter.Add("*"); var files = await picker.PickMultipleFilesAsync(); foreach (StorageFile file in files) { lbFiles.Items.Add(file.FileName); } System.Collections.Generic.IReadOnlyList Windows.Foundation.Collections.IVectorView <Windows.Storage.StorageFile> <Windows.Storage.StorageFile>
  • 31. FileOpenPicker picker = new FileOpenPicker(); picker.FileTypeFilter.Add("*"); StorageFile file = await picker.PickSingleFileAsync(); Windows.Storage.Streams.IInputStream inputStream = await file.OpenForReadAsync(); System.IO.Stream stream = inputStream.AsStream(); System.IO.StreamReader reader = new StreamReader(stream); string contents = reader.ReadToEnd();
  • 32. internal async void ProtectBytes(byte[] data, BinaryWriter output) { DataProtectionProvider dpp = new DataProtectionProvider(); IBuffer result = await dpp.ProtectAsync(data.AsBuffer()); byte[] protectedData; int start = 0; if (result.TryGetUnderlyingData(out protectedData, out start)) output.Write(protectedData); else throw new InvalidOperationException(); }
  • 34. ComVisible(true), Guid("06D7901C-9045-4241-B8A0-39A1AC0F8618")] public interface IWindowsApiSample { string HelloWorld(); } [ComVisible(true), [ClassInterface(ClassInterfaceType.None)] [ComDefaultInterface(typeof(IWindowsApiSample))] public class WindowsApiSample : IWindowsApiSample { public string HelloWorld() { return "Hello, World!"; } }
  • 35. public sealed class MyClassLibrary { public string HelloWorld() { return "Hello, World!"; } }
  • 40. demo
  • 47. demo
  • 50. demo