8. Using MVVM (Light)
• Get the NuGet for MVVM Light
• Add your ViewModel registrations in
ViewModelLocator
• Set ViewModelLocator in App.xaml
• Bind View DataContext to your
ViewModel
16. Styling & branding
• Personalize your app !
• Use VS app template
• There will be a Common folder with
StandardStyles.xaml
• We derived our own from those
StandardStyles
18. Bing Maps
• Install Bing Maps SDK for Metro
• Get a Bing Maps key & put it in App.xaml
• Add references
• Choose a Platform!
– ARM, x86 or x64 > Not Any CPU
20. Image manipulation
• Get WriteableBitmapEx lib
• Use FromStream method to get
image from Url
• Use Blit method for image
manipulation
• Remark – Blue shade in current
23. Flyout in XAML
• Get Callisto library
• Add event to a control to trigger
Flyout
• In code set Placement where you
need it on the page
• Add controls you like
25. Integrate with charms
• Windows 8 provides charms, use
them
• Share contract
• Search contract
• Settings
26. Share charms
• ShareManager class
– Initialize in code behind of view
– Initialize in ViewModel
• ShareDate class
– Use to share content given from
ViewModel
Why did we build the app ? What did we build so far (demo) ?Data is most important aspect in Win8 -> data layer firstBuilding a Win8 appMVVM – navigationRetrieving data asyncXAML (labels, ...)Maps, flyout, appbar, share contract, resources, ...
By Glenn?
Glenn
Glenn
By Bart
Glenn
By Bart
By Glenn
SDK link: http://visualstudiogallery.msdn.microsoft.com/0c341dfb-4584-4738-949c-daf55b82df58/Key link: http://www.bingmapsportal.com/References: Bing Maps for C#, C++, or Visual Basic and Microsoft Visual C++ Runtime Package ( both from Windows > Extension )Show App.xaml for keyShow EventDetailPage.xaml for LocationPanel ( stackpanel ) > Added Map controlCurrently no Porperty binding in RP release... > So we set the pushpin in the code behindhttp://social.msdn.microsoft.com/Forums/et-EE/bingmapswindows8/thread/e9126684-a22b-46d5-82d9-23ab4d95870fhttp://social.msdn.microsoft.com/Forums/en-US/bingmapswindows8/thread/e8c52173-8900-4da2-a07b-485c96404099
By Glenn
WriteableBitmapEx lib: http://writeablebitmapex.codeplex.com/Currently in the WinRT release there is some code in the FromStream method the swaps the Blue with the Red channel! Still need to verify the code to get a fix!Cfr tweets from René Schulte > http://www.twitter.com/rschu/status/214432418789212160 and http://www.twitter.com/rschu/status/214434170921955328
By Glenn
No, there is STILL no Flyout control in XAMLhttp://msdn.microsoft.com/en-us/library/windows/apps/hh465341.aspx > No XAML only JS
Show UpcomingEventsPage.xaml > ShowFlyoutMenu method triggered from Click on AppBar iconShow UpcomingEventsPage.xaml.cs > Show ShowFlyoutMenu method where we add a Menu with ToggleMenuItems in the control
By Bart
By Bart
Data = IMPORTANTNot all apps should be black and white, make them attractiveStick to the guidelines (margins, app bar, ...)Use the power of the Win8 platform and integrate with charms