SlideShare une entreprise Scribd logo
1  sur  29
Windows Store & Phone Dev
top 10 differences
@dotMorten
Who’s who?
Windows
Phone
Platform of choice
C# since .NET 1.0 beta 2
XAML fulltime since Silverlight v1.1
Work: Building SDKs for
mapping
Silverlight, WPF, Windows
Phone, Windows Store
Hobby:
Same thing but I get to be boss 
Windows 8
WPF
Who’s who #2
What is your preferred coding language?
C#
VB.NET
JavaScript
C++
Other
What platform do you develop most for?
Windows 8
Windows Phone
WPF
Windows Forms
Other
The Inspiration for This Talk
• ArcGIS Runtime SDK for Windows
A Mapping SDK for Windows Phone, Store and Desktop.
Core runtime (C++ & DirectX)
C++ interop
C++/CX WinRT API
C# imports
Public .NET SDK (C#)
Store Phone Desktop
Use Portable Class Library if you can
Pro:
Build, test and compile once.
Con:
Won’t work for UI code
Can’t use non-PCL libraries
No Platform specific code
Use shared source only when you can’t
Pro:
Can always fully use the platform.
Can use non-PCL components
Con:
Likely more testing involved.
Visual Studio gets a little “weird” about it.
More stuff to compile
Or… use them both!
But why share source?
PCL And Shared Source Together
Windows Phone
8
Portable Class Libraries
Windows 8
Services
ViewModels (limited or abstract)
Models
Views (XAML)
App Lifecycle
Navigation
Views (XAML)
Converters
Shared ViewModels (Add as Link)
Storage, Alerts
Platform Specific
Different XAML
Different Controls
Same DataBindings
Same Commands for
Key Interactions
Converters
Quick Code Share Demo
sounds too good to be true?
99% harp
music
It almost is...
At least 99% shared code.
What’s in the remaining 1%?
1% drums
#if NETFX_CORE //Store
#elif WINDOWS_PHONE //Phone
#elif SILVERLIGHT //Silverlight or Phone
#else //WPF/Desktop
#endif
Or combine them:
#if NETFX_CORE || WINDOWS_PHONE
#if !SILVERLIGHT
#if SILVERLIGHT && !WINDOWS_PHONE
Encapsulate platform specific code using
#if [conditional]
1. Namespaces
#if NETFX_CORE
using Windows.UI.Xaml;
#else
using System.Windows;
#endif
Phone / WPF / Silverlight Windows Store
System.Windows Windows.UI.Xaml
System.Windows.Media Windows.UI
System Windows.Foundation*
System
System.Size Windows.Foundation.Size*
System.Windows.Media.Color
Windows.UI.Color
Microsoft.Xna.Framework.Graphics.Color
Windows.UI.Color
Windows Phone/WPF/Silverlight
xmlns:local="clr-namespace:MyNamespace;assembly=MyApp"
Windows Store XAML
xmlns:local="using:MyNamespace"
2. XAML Namespace declaration
3. Touch/Mouse/Pen
Touch is kind of
like a mouse
Everything is
just a pointer
Windows Phone Windows Store
MouseEventHandler => PointerEventHandler
MouseLeftButtonDown => PointerPressed
MouseMove => PointerMoved
MouseEnter/Exit => PointerEntered/Exited
Tap => Tapped
DoubleTap => DoubleTapped
Hold => Holding
3. Touch/Mouse/Pen #2
Windows Phone:
Make web requests using “WebClient”
Install NuGet package “Microsoft.Net.Http”
Windows Store:
Make web requests using “HttpClient”
4. HttpClient vs. WebClient
HttpClient
Use the Dispatcher to call the UI Thread
However they look different...
5. The Dispatcher
Windows Phone
Windows Store:
5. The Dispatcher #2
5. The Dispatcher #3
public class MyViewModel
{
public MyViewModel()
{
if(IsDesign) // <- different on every platform
MyProperty = "Lorem Ipsum";
else
GenerateData();
}
public string MyProperty { get; set; }
…
}
6. Generating Design Time Data
public bool IsDesign
{
get
{
#if NETFX_CORE
return Windows.ApplicationModel.DesignMode.DesignModeEnabled;
#elif SILVERLIGHT // includes WINDOWS_PHONE
return System.ComponentModel.DesignerProperties.IsInDesignTool;
#else //WPF
return
System.ComponentModel.DesignerProperties.GetIsInDesignMode(this);
#endif
}
}
6. Generating Design Time Data
#2
Windows Phone:
this.NavigationService.Navigate(
new Uri("/MyPage.xaml?parameter="+param.ToString(),
UriKind.Relative));
this.NavigationService.Navigate(
new Uri("MyAssembly;component/MyPage.xaml", UriKind.Relative));
Windows Store:
this.Frame.Navigate(typeof(MyPage), param);
7. Page Navigation
Windows Phone:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
string parameter = NavigationContext.QueryString["parameter"];
base.OnNavigatedTo(e);
}
Windows Store:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
object parameter = e.Parameter;
base.OnNavigatedTo(e);
}
7. Page Navigation
GridView  LongListSelector
8. Controls #2
Windows Store
If your app has internet access,
it MUST have a privacy policy!
Windows Phone
If your app uses the location service,
it MUST have an option to disable it!
9. Certification Requirements
10. Where did it go?
Phone Store
Roaming Settings ⛔ 
UI Controls System.Windows Windows.Xaml.UI
Behaviors  ⛔
Remote debugging USB WiFi/LAN
DirectWrite, Direct2D ⛔ 
WritableBitmap.Render  ⛔
RadialBrush  ⛔
XNA
Deprecated
(use DirectX)
⛔
(use DirectX)
LOB Company Hub APIs  ⛔
Binding.StringFormat  ⛔
Native JavaScript Apps ⛔(use PhoneGap) 
Render DirectX to XAML DrawingSurface SurfaceImageSource
References
MSDN Magazine
Sharing Code between Windows Phone 8
and Windows 8 Applications
http://esriurl.com/CodeShare1
TechEd 2013 Session
Build It Once For Both: Writing Code and
Designing for Windows 8 and Windows
Phone 8
http://esriurl.com/CodeShare2
Questions?
Blog (and slides):
www.sharpgis.net
Twitter:
@dotMorten
E-mail:
mnielsen@esri.com
THANK YOU !

Contenu connexe

Tendances

01 wp7 introduction
01 wp7   introduction01 wp7   introduction
01 wp7 introduction
Tao Wang
 
Windowsphone7
Windowsphone7Windowsphone7
Windowsphone7
yuvaraj72
 
Dev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guideDev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guide
TrioBlack Trioblack
 

Tendances (20)

Windows 10 e Universal Windows Platform
Windows 10 e Universal Windows PlatformWindows 10 e Universal Windows Platform
Windows 10 e Universal Windows Platform
 
Designing and developing a Windows Phone 7 Silverlight Application End-to-End...
Designing and developing a Windows Phone 7 Silverlight Application End-to-End...Designing and developing a Windows Phone 7 Silverlight Application End-to-End...
Designing and developing a Windows Phone 7 Silverlight Application End-to-End...
 
Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2Windows 10 & Raspberry Pi 2
Windows 10 & Raspberry Pi 2
 
Introduction to universal windows platform(uwp) app development
Introduction to universal windows platform(uwp) app developmentIntroduction to universal windows platform(uwp) app development
Introduction to universal windows platform(uwp) app development
 
01 wp7 introduction
01 wp7   introduction01 wp7   introduction
01 wp7 introduction
 
Universal windows platform - Application development done right
Universal windows platform - Application development done rightUniversal windows platform - Application development done right
Universal windows platform - Application development done right
 
Windows Phone Apps Development overview
Windows Phone Apps Development overviewWindows Phone Apps Development overview
Windows Phone Apps Development overview
 
Windows Phone Application Platform
Windows Phone Application PlatformWindows Phone Application Platform
Windows Phone Application Platform
 
Docker for .net developer
Docker for .net developerDocker for .net developer
Docker for .net developer
 
Getting started windows phone unity
Getting started windows phone unityGetting started windows phone unity
Getting started windows phone unity
 
Develop a Windows 10 App. Deploy it on PC, Phone and Raspberry Pi.
Develop a Windows 10 App.  Deploy it on PC, Phone and Raspberry Pi.Develop a Windows 10 App.  Deploy it on PC, Phone and Raspberry Pi.
Develop a Windows 10 App. Deploy it on PC, Phone and Raspberry Pi.
 
Windows 8.1
Windows 8.1Windows 8.1
Windows 8.1
 
Windowsphone7
Windowsphone7Windowsphone7
Windowsphone7
 
Dev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guideDev windows phone_apps_getting_started_guide
Dev windows phone_apps_getting_started_guide
 
Indie Game Development
Indie Game DevelopmentIndie Game Development
Indie Game Development
 
Ppt on windows 8
Ppt on windows 8Ppt on windows 8
Ppt on windows 8
 
Stc ftn-wp7-intro
Stc ftn-wp7-introStc ftn-wp7-intro
Stc ftn-wp7-intro
 
Windows Phone Programming
Windows Phone ProgrammingWindows Phone Programming
Windows Phone Programming
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014
 

Similaire à Top 10 Differences between developing Windows Phone and Store apps

Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Jason Conger
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworks
Sasha dos Santos
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
Mamgmo Magnda
 

Similaire à Top 10 Differences between developing Windows Phone and Store apps (20)

Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
Building your Own Mobile Enterprise Application: It’s Not as Hard as You Migh...
 
Welcome to windows 8
Welcome to windows 8Welcome to windows 8
Welcome to windows 8
 
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
Building Beautiful and Interactive Metro apps with JavaScript, HTML5 & CSS3
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
An introduction to Windows Mobile development
An introduction to Windows Mobile developmentAn introduction to Windows Mobile development
An introduction to Windows Mobile development
 
Build Recap
Build RecapBuild Recap
Build Recap
 
Windows 10 pentru dezvoltatori - InfoEducație 2015
Windows 10 pentru dezvoltatori - InfoEducație 2015Windows 10 pentru dezvoltatori - InfoEducație 2015
Windows 10 pentru dezvoltatori - InfoEducație 2015
 
An overview of mobile html + java script frameworks
An overview of mobile html + java script frameworksAn overview of mobile html + java script frameworks
An overview of mobile html + java script frameworks
 
Build Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilderBuild Your First iPhone or Android App with Telerik AppBuilder
Build Your First iPhone or Android App with Telerik AppBuilder
 
C# everywhere
C# everywhereC# everywhere
C# everywhere
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Developing cross platform apps in Flutter (Android, iOS, and Web)
Developing cross platform apps in Flutter (Android, iOS, and Web)Developing cross platform apps in Flutter (Android, iOS, and Web)
Developing cross platform apps in Flutter (Android, iOS, and Web)
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
 
Xamarin for (not only) Android developers
Xamarin for (not only) Android developersXamarin for (not only) Android developers
Xamarin for (not only) Android developers
 
Windows phone 7 application development
Windows phone 7 application developmentWindows phone 7 application development
Windows phone 7 application development
 
Getting started with PhoneGap
Getting started with PhoneGapGetting started with PhoneGap
Getting started with PhoneGap
 
Ignite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and FirebaseIgnite your app development with Angular, NativeScript and Firebase
Ignite your app development with Angular, NativeScript and Firebase
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
 
An introduction to Xamarin
An introduction to XamarinAn introduction to Xamarin
An introduction to Xamarin
 
Building Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using CordovaBuilding Cross-Platform JavaScript Apps using Cordova
Building Cross-Platform JavaScript Apps using Cordova
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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...
 

Top 10 Differences between developing Windows Phone and Store apps

  • 1. Windows Store & Phone Dev top 10 differences @dotMorten
  • 2. Who’s who? Windows Phone Platform of choice C# since .NET 1.0 beta 2 XAML fulltime since Silverlight v1.1 Work: Building SDKs for mapping Silverlight, WPF, Windows Phone, Windows Store Hobby: Same thing but I get to be boss  Windows 8 WPF
  • 3. Who’s who #2 What is your preferred coding language? C# VB.NET JavaScript C++ Other What platform do you develop most for? Windows 8 Windows Phone WPF Windows Forms Other
  • 4. The Inspiration for This Talk • ArcGIS Runtime SDK for Windows A Mapping SDK for Windows Phone, Store and Desktop. Core runtime (C++ & DirectX) C++ interop C++/CX WinRT API C# imports Public .NET SDK (C#) Store Phone Desktop
  • 5. Use Portable Class Library if you can Pro: Build, test and compile once. Con: Won’t work for UI code Can’t use non-PCL libraries No Platform specific code Use shared source only when you can’t Pro: Can always fully use the platform. Can use non-PCL components Con: Likely more testing involved. Visual Studio gets a little “weird” about it. More stuff to compile Or… use them both! But why share source?
  • 6. PCL And Shared Source Together Windows Phone 8 Portable Class Libraries Windows 8 Services ViewModels (limited or abstract) Models Views (XAML) App Lifecycle Navigation Views (XAML) Converters Shared ViewModels (Add as Link) Storage, Alerts Platform Specific Different XAML Different Controls Same DataBindings Same Commands for Key Interactions Converters
  • 8. sounds too good to be true? 99% harp music It almost is... At least 99% shared code. What’s in the remaining 1%? 1% drums
  • 9. #if NETFX_CORE //Store #elif WINDOWS_PHONE //Phone #elif SILVERLIGHT //Silverlight or Phone #else //WPF/Desktop #endif Or combine them: #if NETFX_CORE || WINDOWS_PHONE #if !SILVERLIGHT #if SILVERLIGHT && !WINDOWS_PHONE Encapsulate platform specific code using #if [conditional]
  • 10.
  • 11. 1. Namespaces #if NETFX_CORE using Windows.UI.Xaml; #else using System.Windows; #endif Phone / WPF / Silverlight Windows Store System.Windows Windows.UI.Xaml System.Windows.Media Windows.UI System Windows.Foundation* System System.Size Windows.Foundation.Size* System.Windows.Media.Color Windows.UI.Color Microsoft.Xna.Framework.Graphics.Color Windows.UI.Color
  • 12. Windows Phone/WPF/Silverlight xmlns:local="clr-namespace:MyNamespace;assembly=MyApp" Windows Store XAML xmlns:local="using:MyNamespace" 2. XAML Namespace declaration
  • 13. 3. Touch/Mouse/Pen Touch is kind of like a mouse Everything is just a pointer
  • 14. Windows Phone Windows Store MouseEventHandler => PointerEventHandler MouseLeftButtonDown => PointerPressed MouseMove => PointerMoved MouseEnter/Exit => PointerEntered/Exited Tap => Tapped DoubleTap => DoubleTapped Hold => Holding 3. Touch/Mouse/Pen #2
  • 15. Windows Phone: Make web requests using “WebClient” Install NuGet package “Microsoft.Net.Http” Windows Store: Make web requests using “HttpClient” 4. HttpClient vs. WebClient HttpClient
  • 16. Use the Dispatcher to call the UI Thread However they look different... 5. The Dispatcher
  • 17. Windows Phone Windows Store: 5. The Dispatcher #2
  • 19. public class MyViewModel { public MyViewModel() { if(IsDesign) // <- different on every platform MyProperty = "Lorem Ipsum"; else GenerateData(); } public string MyProperty { get; set; } … } 6. Generating Design Time Data
  • 20. public bool IsDesign { get { #if NETFX_CORE return Windows.ApplicationModel.DesignMode.DesignModeEnabled; #elif SILVERLIGHT // includes WINDOWS_PHONE return System.ComponentModel.DesignerProperties.IsInDesignTool; #else //WPF return System.ComponentModel.DesignerProperties.GetIsInDesignMode(this); #endif } } 6. Generating Design Time Data #2
  • 21. Windows Phone: this.NavigationService.Navigate( new Uri("/MyPage.xaml?parameter="+param.ToString(), UriKind.Relative)); this.NavigationService.Navigate( new Uri("MyAssembly;component/MyPage.xaml", UriKind.Relative)); Windows Store: this.Frame.Navigate(typeof(MyPage), param); 7. Page Navigation
  • 22. Windows Phone: protected override void OnNavigatedTo(NavigationEventArgs e) { string parameter = NavigationContext.QueryString["parameter"]; base.OnNavigatedTo(e); } Windows Store: protected override void OnNavigatedTo(NavigationEventArgs e) { object parameter = e.Parameter; base.OnNavigatedTo(e); } 7. Page Navigation
  • 23.
  • 25. Windows Store If your app has internet access, it MUST have a privacy policy! Windows Phone If your app uses the location service, it MUST have an option to disable it! 9. Certification Requirements
  • 26. 10. Where did it go? Phone Store Roaming Settings ⛔  UI Controls System.Windows Windows.Xaml.UI Behaviors  ⛔ Remote debugging USB WiFi/LAN DirectWrite, Direct2D ⛔  WritableBitmap.Render  ⛔ RadialBrush  ⛔ XNA Deprecated (use DirectX) ⛔ (use DirectX) LOB Company Hub APIs  ⛔ Binding.StringFormat  ⛔ Native JavaScript Apps ⛔(use PhoneGap)  Render DirectX to XAML DrawingSurface SurfaceImageSource
  • 27. References MSDN Magazine Sharing Code between Windows Phone 8 and Windows 8 Applications http://esriurl.com/CodeShare1 TechEd 2013 Session Build It Once For Both: Writing Code and Designing for Windows 8 and Windows Phone 8 http://esriurl.com/CodeShare2

Notes de l'éditeur

  1. System.Windows vs. Windows.UI.Xaml....System.Windows.MarkupWindows.UI.Xaml.MarkupSystem.Windows.MediaWindows.UISystem.SizeWindows.Foundation.SizeSystem.WindowsWindows.FoundationBe careful though:System.Windows.Media.Color vs. Windows.UI.Color: Exists on WP, but comes from WinRT types (+there&apos;s also an XNA version)
  2. Pointers vs. MouseSystem.Windows.Input.MouseEventHandlerWindows.UI.Xaml.Input.PointerEventHandler WP: (Double)Tap, WinStore: (Double)Tapped WP: MouseLeftButtonDown, WinStore: PointerPressed
  3. System.Windows.Input.MouseEventHandlerWindows.UI.Xaml.Input.PointerEventHandler WP: (Double)Tap, WinStore: (Double)Tapped WP: MouseLeftButtonDown, WinStore: PointerPressed
  4. (use NuGet package, but no compression).. Include link to Gzip code + pcl
  5. Switching to Dispatcher threadDispatcher.HasThreadAccessvsCheckAccess(), BeginInvoke, RunAsyncvar dispatcher = System.Windows.Deployment.Current.Dispatcher; var dispatcher = Windows.UI.Xaml.Window.Current.Dispatcher;
  6. WinStoreWindows.ApplicationModel.DesignMode.DesignModeEnabledWinPhoneSystem.ComponentModel.DesignerProperties.IsInDesignTool WPF System.ComponentModel.DesignerProperties.GetIsInDesignMode(UIElement)
  7. WinStoreWindows.ApplicationModel.DesignMode.DesignModeEnabledWinPhoneSystem.ComponentModel.DesignerProperties.IsInDesignTool WPF System.ComponentModel.DesignerProperties.GetIsInDesignMode(UIElement)
  8. Different parameterMultipleFramesBack button vs hooking up backspace.
  9. Different parameterMultipleFramesBack button vs hooking up backspace.
  10. Snap View. Privacy Policy
  11. WinPhone: Roaming settingsWinRT UI Stack Remote Debugging via Wifi No DWrite or Direct2D on WinPhoneWinStore:WriteableBitmap.Render()RadialBrushes XNA LOB Company Hub APIs (was told “Wait for //build/ conference” this week) Rich Binding support Remote debugging via USB (issue with some wifi networks) See article http://www.itwriting.com/blog/6779-how-to-test-and-debug-an-app-on-surface-rt-in-a-hotel-room.html Build apps using JavaScript (PhoneGap for WP if you really want to)Behaviors