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

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

min-jolicoeur
min-jolicoeur . @min-jolicoeur
Follow
345 views
Uploaded On 2018-10-22

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

Chipalo Street Program Manager Microsoft Corporation APP914T Agenda Overview of new features in XAML text controls Printing simplification in Windows 8 and XAML framework Youll leave with examples ID: 693499

xaml printing preview windows printing xaml windows preview provide print pages text page initialization register app paginate richtextblockoverflow touch

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "The lifetime of XAML text: from input to..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

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

Chipalo Street Program ManagerMicrosoft Corporation

APP-914TSlide2

Agenda

Overview of new features in XAML text controlsPrinting simplification in Windows 8 and XAML framework

You’ll leave with examples

of

how to

Use new features available in XAML text controls

Integrate

a XAML app with the printing

charmSlide3

Editable

TextBox

PasswordBox

Familiar XAML text controls

Non editable

TextBlockSlide4

What’s new

Touch text selection

includes context menus

selection on by default for all controls except

TextBlock

Soft keyboard integration

i

mplicit invocationSlide5

What’s new

IsSpellCheckEnabled

language specific for free

off by default on

TextBox

IsTextPredictionEnabled

language specific for free

only when using soft keyboardSlide6

What’s new

Clear text button

Standard leading model

LineStackingStrategy

= “

BaselineToBaseline

”Slide7

What’s new

Password reveal button

only reveals during holdSlide8

Designed for touch

Great touch features are baked into default text controls

Touch text selection

Integration with the soft keyboard

Spell checking

Text prediction

demo Slide9

RichTextBlock – new element

Richer text display than

TextBlock

Designed for touch selection

Many

of the same properties as

TextBlockSlide10

XAML page

RichTextBlockOverflow – new element

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

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

RichTextBlockOverflow

OverflowContentTargetSlide11

RichTextBlock

RichTextBlockOverflow

RichTextBlockOverflowSlide12
Slide13

Linked text containers

RichTextBlock starts a chain of linked text containers

RichTextBlockOverflow elements can be linked to the first

RichTextBlock

or

another

RichTextBlockOverflow

element

RichTextBlock

RichTextBlockOverflow

RichTextBlockOverflow

RichTextBlockOverflow

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

(with no limit)

…Slide14

RichTextBlockOverflow - attributes

Most controlled

by

RichTextBlock

OverflowContentTarget

(also on RichTextBlock)

HasOverflowContent

(also on RichTextBlock)Slide15

Differentiating your experience

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

touch experience

demo Slide16
Slide17

Register for printing

XAML printing

When: app startup

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

Register for printing

XAML printing

Printing initialization

When: user invokes print charm

Why: provide Windows with basic info about current print jobSlide19

Register for printing

XAML printing

Paginate content

When:

printer settings are ready for preview pages to be created

Why: ensure there are preview pages to show the user

Printing initializationSlide20

Register for printing

XAML printing

Paginate content

Provide preview page

When: Windows asks for a specific preview page

Why: user has requested to see a print preview page

Printing initializationSlide21

Register for printing

XAML printing

Paginate content

Provide preview page

When

: Windows asks app to create preview pages

Why: user changed print settings

Printing initializationSlide22

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pages

When: Windows is ready to print

Why: user requested printing to beginSlide23

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pagesSlide24

Register for printing

public

MainPage

()

{

}// let XAML help with printing_printDocument = new PrintDocument();

// add handler to create print preview pages

_printDocument.Paginate += new PaginateEventHandler(CreatePreviewPages);PrintManager printManager = PrintManager.GetForCurrentView();// add a handler for printing initializationprintManager.PrintTaskInitializing += new TypedEventHandler<PrintManager,

PrintTaskInitializingEventArgs>(

InitializePrintTask);

// add a handler to provide a specific preview page

_

printDocument.GetPreviewPage

+=

new

GetPreviewPageEventHandler

(

GetPreviewPage

);

// add a handler to provide final print pages

_

printDocument.AddPages

+=

new

AddPagesEventHandler

(

AddPages

);

_

docSource

=

_

printDocument.DocumentSource

;

// save the

DocumentSourceSlide25

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pagesSlide26

Printing initialization

void

InitializePrintTask

(

PrintManager sender, PrintTaskInitializingEventArgs args){}// provide the doc source and print job nameargs.Request.InitializePrintTask(documentSource,

"Printing Demo");

// do any printing initialization needed. for example, create a// cache for print preview pages. _printPreviewPages = new List<UIElement>();Slide27

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pagesSlide28

Paginate content

private

void

CreatePreviewPages

(object sender, PaginateEventArgs e){}// create print preview pages how ever you see fit// while(!CreatedAllPreviewPages())

//{// _

printPreviewPages.Add(CreateOnePage()) ;//}// tell Windows how many print preview pages there are_printDocument.SetPreviewPageCount(_printPreviewPages.Count)Slide29

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pagesSlide30

Provide preview page

private void

GetPreviewPage

(

object

sender,

GetPreviewPageEventArgs e){}// give Windows the preview page that it requested_printDocument.SetPreviewPage(e.PageNumber, _printPreviewPages[

e.PageNumber

- 1]); Slide31

Register for printing

XAML printing

Printing initialization

Paginate content

Provide preview page

Provide final pagesSlide32

Create final print pages

private void

AddPages

(

object

sender,

AddPagesEventArgs e){}// send the pages to Windows in orderfor

(

int i = 0; i < _printPreviewPages.Count; i++){ _printDocument.AddPage(_printPreviewPages[i]) ;}// tell Windows you are done giving it pages to print_printDocument.AddPagesComplete();Slide33

From digital to physical

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

demo Slide34

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

All

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

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

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

XAMLSlide38

For more information

Metro style app sample page

http

://go.microsoft.com/fwlink/?

LinkId=221708

Windows

8 blog http://blogs.msdn.com/b/b8/Slide39

Feedback and q

uestions http://forums.dev.windows.com

Session

f

eedback

http

://bldw.in/SessionFeedback thank youSlide40

©

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.Slide41