Presentation is loading. Please wait.

Presentation is loading. Please wait.

Metro and WinRT for the Silverlight/WPF Developer SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, February 2 nd 2012 -

Similar presentations


Presentation on theme: "Metro and WinRT for the Silverlight/WPF Developer SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, February 2 nd 2012 -"— Presentation transcript:

1 Metro and WinRT for the Silverlight/WPF Developer SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, February 2 nd 2012 www.snowball.be - gill.cleeren@ordina.be - @gillcleeren

2 About myself... Gill Cleeren.NET Architect @Ordina (www.ordina.be)www.ordina.be Microsoft Regional Director Silverlight MVP Speaker (TechDays, TechEd, DevReach, DevDays, NDC Norway, Telerik Usergroup tour Sweden, UK and Scotland...) Visug user group lead (www.visug.be)www.visug.be Author (Silverlight 4 Data and services cookbook) – And a new one is being finished as we speak! Blog: www.snowball.bewww.snowball.be Email: gill@snowball.begill@snowball.be Twitter: @gillcleeren

3 Some practical stuff Ask questions through Q&A window – Well answer them after the session or by personal mail A link to the video recording will be sent to you

4 You can win! Complete the post-webinar survey and win! You can win one of the 3 ebooks Getting Ready for Microsoft Silverlight Exam 70-506!

5 You can win! Tweet this webinar (comments, feedback...) using #webinarsilverlightshow tag! You can win one of the 3 ebooks Silverlight 4 Data and Services Cookbook (yep, thats my book )

6 New version coming soon! Updated for Silverlight 5 Over 115 recipes (thats 30 extra!) Extended to about 700 pages (thats 250 extra!) Covering WP7, MVVM, RIA Services and much more! More info: http://bit.ly/SL5DataAndServices

7 This may look like the typical Introduction to Silverlight for developers or something...

8 But its really all about transferring your current knowledge to Windows 8.

9 This is the road to development on Windows 8 In this part... General XAML stuff for Windows 8 Old and new controls Finding your way with navigation

10 This is the road to development on Windows 8 In the second part (next week Thursday 9th February) Styling and templating Data in your Windows 8 apps – Getting data – Data binding The Application Lifecycle (Copyright 2010 Windows Phone 7) Tiles and more (Copyright 2010 Windows Phone 7) IOing in Metro apps Visit SilverlightShow.net

11 Focus on... Windows Core OS Services JavaScript (Chakra) C C++ C# VB Metro style Apps Communication & Data Application Model Devices & Printing WinRT APIs Graphics & Media XAMLHTML / CSS HTML JavaScript C C++ C# VB Desktop Apps Win32.NET / SL Internet Explorer

12 Before we begin... You can earn something!

13 For every Metro topic you already know, you get a badge! For every Metro topic you already know, you get a badge!

14 GENERAL XAML STUFF FOR WINDOWS 8 You can earn the General XAML for Windows 8 badge

15 The user is free to select any device, Windows 8 will support it. Your app needs to adapt to bring the best possible experience.

16 Size doesnt matter... (For XAML, that is) Minimum app resolution is 1024x768 Baseline resolution is 1366x768 On any resolution, your app should still look good – However, it should use the added screen estate

17 Were lucky to have XAML XAML supports fluid layout – Horizontal and vertical stretching of elements – Star-sizing (Yes, you know this already...)

18 XAML has fixed layouts

19 But fluid layouts are often a better choice

20 Windows 8 supports new and changing formats for apps: an app can be snapped while running.

21 Snap view is new... The Snapped app is always 320px wide User can choose to snap your app – Any app can be snapped, even a game Some apps dont make sense in snapped view, pausing them might be a good idea Context is maintained between several views – Continuous flow of context For perfect experience, the app can adapt to changing views Scrolling patterns change in Snapped Can be called by swiping or using Win +.

22

23 Grid Template Normal

24

25 Grid Template Snapped

26

27

28 And the user will rotate that device... He will (we all know that...). What will (or should we say Should?) your app do?

29 What about orientation? Windows 8 supports to be rotated (if supported by the device) – Dont go rotating your laptop, it wont work Apps behave consistently in orientation changes Apps can be tailored to be in specific orientations Apps can prefer and/or lock an orientation While in Portrait, snapping doesnt work

30 New properties for orientation …

31 New properties for orientation protected override void OnLaunched(LaunchActivatedEventArgs args) { DisplayProperties.AutoRotationPreferences = DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped; Window.Current.Content = new MainPage(); Window.Current.Activate(); }

32 Now what do I use? Resize – Window events…you will still get them Layout – View state changes: FullScreen, Filled, Snapped Orientation – Portrait Landscape changes

33 And do you still remember our good friend, the VisualStateManager? (Yes you do, remember you need to earn that badge!)

34 VisualStateManager VSM can be used in combination with layout A VisualState for a layout – FullScreen (this is normal and Landscape) – Filled – Snapped – Portrait VisualStateManager.GoToState() helps easy switching

35 GENERAL XAML STUFF FOR WINDOWS 8 DEMO

36 Congratulations, you earned a badge! General XAML for Windows 8

37 OLD AND NEW CONTROLS You can earn the Be in Control with Windows 8 badge

38 Controls Most old XAML controls are still supported: – Same control model supported in Silverlight, WP7 and WPF – Same properties (mostly) – Animations, Visual State Manager (VSM) and Parts model Well see VSM again later – Content and item controls still exist, new ones have been added – Updated to support both touch and mouse PointerXXX events – Styled with a Windows 8 style Similar to WP7 default styles

39 Most old controls made the transfer to Windows 8...

40

41 THE GOLDEN OLDIES IN WINDOWS 8 DEMO

42 Some are new and shiny! Or perhaps not that new...

43 Some of the new controls MediaPlayer ToggleSwitch ProgressRing

44 Hello WP7 ApplicationBar (close enough) Contains UI for app commands – Replaces your typical menus and toolbars Persistent, light dismiss or time dismiss Swipe in from top/bottom to display

45 THE NEW CONTROLS ON THE BLOCK DEMO

46 And then there were collections... Collections are everywhere, also in Windows 8...

47

48 New XAML list controls that work almost identically to old ones have been added in Windows 8.

49 New XAML List controls ListView GridView – Supports grouping Semantic zoom (JumpViewer) FlipView They support new selection models – Single – Multiple – Grouping

50 Just use them as you would today.

51 ListView Like a ListBox, but optimized for Windows 8 Supports virtualization Often handy in snapped view

52 Interaction model IsItemClickEnabled ItemClick event SelectionMode

53 CHANGE LISTBOX INTO LISTVIEW DEMO

54 GridView Allows creation of grid-based layouts Supports grouping of items (next slide) Has WrapGrid or VariableSizedWrapGrid

55 GR ouping in the GR idview Group content by natural ordering of lists – Needs to be done by the developer, control doesnt know on what it should group Visually appealing headers that fit in with Metro style UI

56 GRIDVIEW AND GROUPING DEMO

57 Semantic zoom... //some xaml here...... //some more xaml here...

58 SEMANTIC ZOOM DEMO

59 Congratulations, you earned a badge! Be in Control with Windows 8

60 FINDING YOUR WAY WITH NAVIGATION You can earn the The Navigator badge

61 Same concepts as Silverlight and WP7 Frame – Top-level container control – Contains the page control Page – Fills the entire content region of the frame – Can navigate to other pages within frame – Pages can share data...(!!!)

62 Navigation APIs are similar Windows.UI.Xaml.Navigation – NavigationCacheMode – NavigationMode – NavigationFailed – NavigationStopped – LoadCompleted Frame – GoBack() – GoForward() – Navigate() – Source Page – OnNavigateFrom – OnNavigateTo – Frame

63 Frames and pages in Windows 8 Frame control represents the navigation container – Always accessible via this.Frame NavigationService isnt available Page control represents discrete sections of content Share objects/data between your pages – This is new! Page 3

64 Some new stuff in the navigation area Page defines caching behavior on NavigationCacheMode Frame controls navigating history stack – GoBack() – GoForward() – Navigate() – NavigationMode

65 Transitions Integrate Windows 8 look and feel for transitions Frame supports content transitions – EntranceThemeTransition Other transitions available for different scenarios

66 NAVIGATION THROUGH WINDOWS 8 DEMO

67 Congratulations, you earned a badge! The Navigator

68 Summary Look what you already know! NEXT WEEK IN PART 2

69 Q&A

70 THANKS!

71 Metro and WinRT for the Silverlight/WPF Developer SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, February 2 nd 2012 www.snowball.be - gill.cleeren@ordina.be - @gillcleeren


Download ppt "Metro and WinRT for the Silverlight/WPF Developer SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, February 2 nd 2012 -"

Similar presentations


Ads by Google