140 likes | 225 Views
05 | Advanced Contracts Pt 1. Jerry Nixon | Microsoft Developer Evangelist Daren May | President & Co-founder, Crank211. Agenda for the Day. Visit xamlShow on CodePlex http://xaml.codeplex.com. Module Agenda. Print Contract Settings Contract. Print Contract. Printing contract.
E N D
05 | Advanced Contracts Pt 1 Jerry Nixon | Microsoft Developer Evangelist Daren May | President & Co-founder, Crank211
Agenda for the Day • Visit xamlShow on CodePlex • http://xaml.codeplex.com
Module Agenda • Print Contract • Settings Contract
Printing contract Basic API Considerations You are using XAML HTML/CSS is another option You could use your existing UI Probably not the best choice You can create a dedicated printing UI You handle everything pagination preview rendering • PrintManager • PrintDocument • DocumentSource • PrintTask • PrintTaskOptions
Printing architecture Create (1) PrintDocument Get PrintManager (2) For current view Print (8) PrintTaskRequested (3) PrintManager AddPages (7) GetPreviewPage (6) Paginate (5) SetSource (4) PrintDocument
More printing resources • A great resource for a more complex scenario: • 31 Days of Windows 8 | Day #20: Printing • http://www.jeffblankenburg.com/2012/11/20/31-days-of-windows-8-day-20-printing • MSDN Printing Quickstart • http://msdn.microsoft.com/en-us/library/windows/apps/hh465204.aspx
Settings contract • ApplicationSettings.SettingsPane • CommandsRequested event • ApplicationSettings.SettingsCommand • Key • Text • Action • Xaml.Controls.Primitives.Popup
Module Review • Print Contract • Settings Contract