The lifetime of xaml text from input to display through printing l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 41

The lifetime of XAML text: from input to display through printing PowerPoint PPT Presentation


  • 166 Views
  • Uploaded on
  • Presentation posted in: General

APP-914T. The lifetime of XAML text: from input to display through printing. Chipalo Street Program Manager Microsoft Corporation. Agenda. Overview of new features in XAML text controls Printing simplification in Windows 8 and XAML framework. You’ll leave with examples of how to

Download Presentation

The lifetime of XAML text: from input to display through printing

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


The lifetime of xaml text from input to display through printing l.jpg

APP-914T

The lifetime of XAML text: from input to display through printing

Chipalo Street

Program Manager

Microsoft Corporation


Agenda l.jpg

Agenda

  • Overview of new features in XAML text controls

  • Printing simplification in Windows 8 and XAML framework

  • You’ll leave with examples ofhow to

  • Use new features available in XAML text controls

  • Integrate a XAML app with the printing charm


Familiar xaml text controls l.jpg

Familiar XAML text controls

Editable

  • TextBox

  • PasswordBox

Non editable

  • TextBlock


What s new l.jpg

What’s new

Touch text selection

  • includes context menus

  • selection on by default for all controls except TextBlock

Soft keyboard integration

  • implicit invocation


What s new5 l.jpg

What’s new

IsSpellCheckEnabled

  • language specific for free

  • off by default on TextBox

IsTextPredictionEnabled

  • language specific for free

  • only when using soft keyboard


What s new6 l.jpg

What’s new

Clear text button

Standard leading model

  • LineStackingStrategy = “BaselineToBaseline”


What s new7 l.jpg

What’s new

Password reveal button

  • only reveals during hold


Designed for touch l.jpg

demo

Designed for touch

Great touch features are baked into default text controls

Touch text selection

Integration with the soft keyboard

Spell checking

Text prediction


Richtextblock new element l.jpg

RichTextBlock – new element

  • Richer text display than TextBlock

  • Designed for touch selection

  • Many of the same properties as TextBlock


Richtextblockoverflow new element l.jpg

RichTextBlockOverflow – new element

XAML page

RichTextBlock

Today, at the D9 Conference, we demonstrated the next generation of Windows, internally code-named “Windows 8,” for the first time. Windows 8 is a reimagining of Windows, from the chip to the interface. A Windows 8-based PC is really a new kind of device, one that scales from touch-only small screens through to large screens, with or without a keyboard and mouse.

The demo showed some of the ways we’ve reimagined the interface for a new generation of touch-centric hardware. Fast, fluid and dynamic, the experience …

RichTextBlockOverflow

interface for a new generation of touch-centric hardware. Fast, fluid and dynamic, the experience …

OverflowContentTarget


Slide11 l.jpg

RichTextBlock

RichTextBlockOverflow

RichTextBlockOverflow


Linked text containers l.jpg

Linked text containers

  • RichTextBlock starts a chain of linked text containers

  • RichTextBlockOverflow elements can be linked to the first RichTextBlock

or another RichTextBlockOverflow element

(with no limit)

  • Linked text containers need to be in the visual tree for layout

RichTextBlock

RichTextBlockOverflow

RichTextBlockOverflow

RichTextBlockOverflow


Richtextblockoverflow attributes l.jpg

RichTextBlockOverflow - attributes

  • Most controlled by RichTextBlock

  • OverflowContentTarget (also on RichTextBlock)

  • HasOverflowContent(also on RichTextBlock)


Differentiating your experience l.jpg

demo

Differentiating your experience

Linked text containers allow for creation of unique and engaging experiences while maintaining the Windows 8

touch experience


Slide17 l.jpg

XAML printing

Register for printing

When: app startup

Why: enable print charm by telling Windows your app can print


Slide18 l.jpg

XAML printing

Register for printing

Printing initialization

When: user invokes print charm

Why: provide Windows with basic info about current print job


Slide19 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

When: printer settings are ready for preview pages to be created

Why: ensure there are preview pages to show the user


Slide20 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

When: Windows asks for a specific preview page

Why: user has requested to see a print preview page

Provide preview page


Slide21 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

When: Windows asks app to create preview pages

Why: user changed print settings

Provide preview page


Slide22 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

When: Windows is ready to print

Why: user requested printing to begin

Provide final pages

Provide preview page


Slide23 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

Provide final pages

Provide preview page


Register for printing l.jpg

Register for printing

PrintManagerprintManager = PrintManager.GetForCurrentView();

  • publicMainPage()

  • {

  • }

// add a handler for printing initialization

printManager.PrintTaskInitializing+=

newTypedEventHandler<PrintManager,

PrintTaskInitializingEventArgs>(InitializePrintTask);

// let XAML help with printing

_printDocument= newPrintDocument();

// add handler to create print preview pages

_printDocument.Paginate += newPaginateEventHandler(CreatePreviewPages);

// add a handler to provide a specific preview page

_printDocument.GetPreviewPage += new GetPreviewPageEventHandler(GetPreviewPage);

// add a handler to provide final print pages

_printDocument.AddPages += newAddPagesEventHandler(AddPages);

_docSource= _printDocument.DocumentSource; // save the DocumentSource


Slide25 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

Provide final pages

Provide preview page


Printing initialization l.jpg

Printing initialization

  • voidInitializePrintTask(PrintManagersender,

  • PrintTaskInitializingEventArgsargs)

  • {

  • }

// provide the doc source and print job name

args.Request.InitializePrintTask(documentSource, "Printing Demo");

// do any printing initialization needed. for example, create a

// cache for print preview pages.

_printPreviewPages = newList<UIElement>();


Slide27 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

Provide final pages

Provide preview page


Paginate content l.jpg

Paginate content

// create print preview pages how ever you see fit

// while(!CreatedAllPreviewPages())

//{

// _printPreviewPages.Add(CreateOnePage()) ;

//}

  • privatevoidCreatePreviewPages(objectsender, PaginateEventArgs e)

  • {

  • }

// tell Windows how many print preview pages there are

_printDocument.SetPreviewPageCount(_printPreviewPages.Count)


Slide29 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

Provide final pages

Provide preview page


Provide preview page l.jpg

Provide preview page

// give Windows the preview page that it requested

_printDocument.SetPreviewPage(e.PageNumber,

_printPreviewPages[e.PageNumber- 1]);

  • private void GetPreviewPage(object sender,GetPreviewPageEventArgse)

  • {

  • }


Slide31 l.jpg

XAML printing

Register for printing

Printing initialization

Paginate content

Provide final pages

Provide preview page


Create final print pages l.jpg

Create final print pages

  • // send the pages to Windows in order

  • for(int i = 0; i < _printPreviewPages.Count; i++)

  • {

  • _printDocument.AddPage(_printPreviewPages[i]) ;

  • }

  • private void AddPages(object sender,AddPagesEventArgse)

  • {

  • }

  • // tell Windows you are done giving it pages to print

  • _printDocument.AddPagesComplete();


From digital to physical l.jpg

demo

From digital to physical

Use the devices charm to print a Metro style app built with the XAML framework


A lot of great features have been added to the xaml text stack l.jpg

A lot of great features have been added to the XAML text stack.


Slide35 l.jpg

All text controls have been improved to make touch a first class experience for developers and end users.


Printing your app through the unified windows 8 printing experience is simple l.jpg

Printing your app through the unified Windows 8 printing experience is simple.


Related sessions l.jpg

Related sessions

  • [PLAT-679T] Building Metro style apps that print

  • [APP-211T] Create Metro style apps quickly with built-in controls

  • [APP-737T] Metro style apps using XAML: what you need to know

  • [APP-515] Tips and tricks for developing Metro style apps using XAML


For more information l.jpg

For more information

  • Metro style app sample page

    http://go.microsoft.com/fwlink/?LinkId=221708

  • Windows 8 blog

    http://blogs.msdn.com/b/b8/


Feedback and q uestions http forums dev windows com session f eedback http bldw in sessionfeedback l.jpg

thank you

Feedback and questions http://forums.dev.windows.com

Session feedbackhttp://bldw.in/SessionFeedback


Slide40 l.jpg

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


  • Login