85
Visual Studio 2013 제대로 파헤쳐 보기! 11월의 주제 Developing Modern Windows 8.1 Store App -한국 마이크로소프트 기술 에반젤리스트 김영욱 부장 http://www.facebook.com/thewarofit

Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Visual Studio 2013

제대로파헤쳐보기!

11월의주제

Developing Modern Windows 8.1

Store App

-한국마이크로소프트기술에반젤리스트김영욱부장http://www.facebook.com/thewarofit

Page 2: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Rich, integrated search

driven by Bing

Personalized start

and lock screens

New live tile sizes,

including large

Live tile on install

Apps share the screen Deep SkyDrive

integration

Page 3: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

APIs PDF Rendering

Text to Speech

Improved Web Authentication and Account management

Fingerprint reader support

HID, USB and BT class drivers allow many new peripherals to connect to Windows apps

Point of Service (terminals, bar code readers)

3D Printing

Scanning

Direct2D dramatically faster and richer

HTTP API with control over caching, cookies, and more

Many more

Standards WebGL

MPEG-DASH

W3C Encrypted Media Extension allows standardized encrypted media playback

W3C Media Source Extension

WebCrypto

W3C Pointer events allows standardized touch, pen and mouse support across platforms

Enhanced controlsNew Hub control to make it easy to create a great first-screen experience

Webview controls make integration of web-based resources easier and more powerful

Faster and richer versions of popular GridView and ListView controls

Improved StoreApps auto-update by default

New support for gift cards, consumables, and large catalogs

Faster app downloads through intelligent resource downloading

Page 4: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

모든가격대에서만나보는터치스크린

8” Windows tablets

가벼워지고얇아지지만오래가는배터리

배터리사용시간은기본 8시간?

점점더고해상도

LTE, 3G…. 등통신기능기본탑재

http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-

keywords=windows+8.1+tablet&rh=i%3Aaps%2Ck%3Awindows+8.1+tablet

Page 5: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 6: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 7: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 8: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 9: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

User interface

Fundamentals

Devices Graphics and media Communications and data Services

Geo-location

Proximity

Direct3D Direct2D Direct Write

PlayTo

Contracts

Bing

Azure Mobile

HTML5/CSS XAMLInput Controls

Authentication

Portable

Sensors Playback Capture

Printing

SVGCanvas

Local storage

SMS

StreamsBackground

transfer

Syndication Networking

XML and JSON

Skydrive

Live tiles and toast

Accessibility Data binding

Application services

Threading/timersMemory

managementGlobalization Cryptography

Xbox Live

Updated

Page 10: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

User interface

Fundamentals

Devices Graphics and media Communications and data Services

Geo-location

Proximity

Direct3D Direct2D Direct Write

PlayTo

Contracts

Bing

Azure Mobile

HTML5/CSS XAMLInput Controls

Authentication

Bluetooth

USB

HID WiFi direct

Point of service

3Dprinting

Scanning

WebGL

HTTP

Contacts

Appoint-ments

PDF

Speech synthesis

Diagnostics

Portable

Sensors Playback Capture

Printing

SVGCanvas

Local storage

SMS

StreamsBackground

transfer

Syndication Networking

XML and JSON

Skydrive

Live tiles and toast

Accessibility Data binding

Application services

Threading/timersMemory

managementGlobalization Cryptography

Xbox Live

UpdatedNew

Page 11: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Windows 8.1You can develop for both Windows 8 and Windows 8.1 on Windows 8.1

A free Microsoft accountPaid accounts required only for submission to the Windows Store

Visual Studio 2013Use the full-featured paid editions, or build great apps using the free edition for Windows Store development.

Develop in JavaScript, VB, C#, or C++.

Page 12: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

XAML with C#, VB and C++ makes the best use of your wealth of desktop, server, and phone development knowledge to enable you to build compelling Windows Store apps.

Page 13: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 14: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

C++

Windows 8.1 subsystem

Windows Store app using XAML (C++, C#, VB)

AppTheme &

PVLDirect3D

Direct-

WriteDirect2D Media Input

Windows Runtime / XAML

Page 15: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

DirectX

XAML

Page 16: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 17: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Devices & Entry Points Services

Bing As A Platform

Page 18: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Maps

Bing Maps Platform offers a set of

APIs to incorporate the latest maps,

imagery and location services in your

application.

Speech

Get Bing Speech capabilities

integrated with your Windows Phone

and Windows Store apps.

OCR

The Bing Optical Character

Recognition (OCR) Control detects

printed text from images captured by

the device camera.

Translator

The Bing Translator Control and

Microsoft Translator API receive text

and deliver automatic machine

translation into a specified language.

Ads SDK

Whether you’re developing in HTML

or XAML, the Microsoft Advertising

SDK has made it easy to insert ads

into your Windows 8 and Windows

8.1 apps.

Search API

The Bing Search API enables

developers to embed search results

in applications.

Bing As A Platform: Developer Resources

Page 19: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Windows 8.1 developer training

XAML UI Controls

Page 20: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 21: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

FrameworkElement

TextBlock

RichTextBlock

Control

ContentControl

Border

ButtonBase

Button

ToggleButton

CheckBox

RadioButton

ProgressRing

RangeBase ProgressBar

TextBox,

PasswordBox

RichEditBox

Image

Shape Rectangle, Ellipse

Page 22: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

TextBlock

TextBlock

FontSize="40" FontWeight="Bold" FontStyle="Italic"

FontFamily="Times New Roman"

TextBlock

TextTrimming="WordEllipsis"

TextBlock

Typography.Fraction="Slashed"

TextBlock

Typography.StylisticSet4="True"

TextBlock

Typography.StylisticSet5="True"

TextBlock

Typography.StylisticSet6="True"

TextBlock

Typography.StylisticSet7="True"

Page 23: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

RichTextBlock OverflowContentTarget="{Binding ElementName=SecondColumnOverflow}"

Paragraph

Paragraph

Paragraph

Hyperlink

Hyperlink

Paragraph

Paragraph

InlineUIContainer

Button

InlineUIContainer

Run

Run

Paragraph

Paragraph

Run

Paragraph

RichTextBlock

RichTextBlockOverflow x:Name="SecondColumnOverflow"

Page 24: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

TextBlock

ProgressRing IsActive="True"

TextBlock

ProgressBar Minimum="0" Maximum="250" Value="50"

TextBlock

ProgressBar

IsIndeterminate="True"

Important!You must deactivate progress rings and progress bars when not visible. There’s a performance penalty if you do not.

Page 25: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 26: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

<TextBox Text="Hello world" />

<TextBox Text="Headers can be templated" Header="TextBox Header Text"/>

<TextBox Text="I am going to the store for moar bread."

Header="Spell-checking" IsSpellCheckEnabled="True"/>

<TextBox Header="Placeholder text"

PlaceholderText="please enter your first name"/>

<TextBox Header="Color Font Support" Text="I like tapioca. &#x1F600;"

IsColorFontEnabled="True" FontFamily="Segoe UI Emoji" />

<TextBox Text="For on-screen keyboards only"

Header="Text Prediction" IsTextPredictionEnabled="True"/>

<TextBox Text="[email protected]"

Header="Input scope control" PlaceholderText="For touch keyboard"

InputScope="EmailSmtpAddress"/>

<TextBox Text="Peter piper picked a peck" Header="Selection highlight color control"

SelectionHighlightColor="Orange"/>

<PasswordBox Header="Please enter your password" FontSize="40" Margin="20"

IsPasswordRevealButtonEnabled="True" Password="Password1" />

Page 27: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

<TextBox InputScope="EmailSmtpAddress"/>

<TextBox InputScope="Formula"/>

<TextBox InputScope="Number"/>

Page 28: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Button

Click="LoadFileButton_Click"

RichEditBox x:Name="RichTextEditor"

private async void LoadFileButton_Click(object

var new

var await

var await

RichTextEditor.Document.LoadFromStream(TextSetOptions.FormatRtf, stream);

Page 29: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

DatePicker

CalendarIdentifier="GregorianCalendar"

DatePicker

CalendarIdentifier="KoreanCalendar"

DatePicker

CalendarIdentifier="JulianCalendar"

DatePicker

DayFormat="{}{dayofweek.solo.full}"

DatePicker

DayFormat="{}{day.integer} {dayofweek.abbreviated}"

TimePicker

ClockIdentifier="12HourClock"

TimePicker

ClockIdentifier="24HourClock"

Date

Pic

ker

Tim

eP

icker

Page 30: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Button

<Button.Flyout>

<Flyout>

StackPanel

TextBlock

TextBlock

Button

StackPanel

</Flyout>

</Button.Flyout>

Button

Button

<Button.Flyout>

<MenuFlyout>

MenuFlyoutItem

MenuFlyoutItem

MenuFlyoutSeparator

ToggleMenuFlyoutItem

ToggleMenuFlyoutItem

</MenuFlyout>

</Button.Flyout>

Button

Page 31: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

{x:Null}

Page 32: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

TextBlock

Image

TextBlock

Image

Image.Source

BitmapImage DecodePixelWidth="600"

Image.Source

Image

Scale at decode timeProviding a size when loading saves memory as only the bits to be displayed are loaded in memory, reducing your app’s working set.

Often, this results in higher quality scaling as well.

Page 33: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

TextBox Grid.Row="2" Grid.Column="2"

TextBox

TextBox Grid.Row="1" Grid.Column="2"

TextBox

TextBox Grid.Row="0" Grid.Column="3"

TextBox

Page 34: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

TextBox RenderTransformOrigin="0.5,0.5"

<TextBox.RenderTransform>

<TransformGroup>

<RotateTransform Angle="-40" />

<TranslateTransform X="-20" Y="-100" />

</TransformGroup>

</TextBox.RenderTransform>

TextBox

TextBox RenderTransformOrigin="0.5,0.5"

<TextBox.RenderTransform>

<TransformGroup>

<SkewTransform AngleX="10" AngleY="25" />

<TranslateTransform X="-200" Y="150" />

</TransformGroup>

</TextBox.RenderTransform>

TextBox

TextBox

<TextBox.Projection>

<PlaneProjection CenterOfRotationX="0.5" CenterOfRotationY="0.5“

CenterOfRotationZ="0.5"

RotationX="-70" RotationY="0" RotationZ="10"

GlobalOffsetZ="600"/>

</TextBox.Projection>

TextBox

Ro

tate

an

d M

ove

Skew

an

d M

ove

3D

Tra

nsf

orm

Page 35: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 36: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 37: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Viewbox

Grid Width="170" Height="150">

Ellipse

TextBlock

TextBox

Grid

Viewbox

Page 38: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

FlipView

FlipView.ItemTemplate

DataTemplate

Grid

Image

Border

TextBlock

Border

Grid

DataTemplate

FlipView.ItemTemplate

FlipView

Data

Tem

pla

te

Page 39: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

ListView

Page 40: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

GridView

Page 41: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 42: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

SemanticZoom

SemanticZoom.ZoomedInView

<!-- Normal view goes here -->

SemanticZoom.ZoomedInView

SemanticZoom.ZoomedOutView

<!-- high-level view goes here -->

SemanticZoom.ZoomedOutView

SemanticZoom

What can be in the views?The zoomed in and out views are typically GridView or Hub controls, but do not need to be. The control just needs to implement ISemanticZoomInformation.

Page 43: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Windows 8.1 developer training

Windowing and layout

Page 44: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Full landscape

Filled

Sn

ap

ped

Full portrait

Page 45: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 46: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Wider than tall

window

Taller than

wide

window

Taller than

wide windowTaller

than

wide

window

Page 47: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 48: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 49: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Scale with ViewBox

Layout (and scale)

A A

AB ABC

A

BA

B

Page 50: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 51: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

VisualStateManager.VisualStateGroups

VisualStateGroup

VisualState PrimaryLayout

Storyboard Storyboard

VisualState

VisualState NarrowLayout

Storyboard Storyboard

VisualState

VisualState TallLayout

Storyboard Storyboard

VisualState

VisualState ExtraLargeLayout

Storyboard Storyboard

VisualState

VisualStateGroup

VisualStateManager.VisualStateGroups

Visual States

Visual states decouple UI from code.

Rather than manually move elements or resize them from code, you simply invoke the visual state which itself includes Storyboard animations which handle these changes.

Page 52: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

const string PrimaryLayout

const string NarrowLayout

const string TallLayout

const string ExtraLargeLayout

const double

const double

const double

Use constantsSizes and state names will almost certainly change during design iterations

void object

if

this true

else if

this true

else if

this true

else

this true

Page 53: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

protected override void

Window.Current.SizeChanged += OnWindowSizeChanged;

protected override void

Window.Current.SizeChanged -= OnWindowSizeChanged;

Remember to remove those handlersTip: A common source of memory leaks in all .NET apps is failure to remove event handlers. In some cases, handlers go out of scope naturally. Not so when external singleton or static classes are involved. Always clean up your handlers.

Page 54: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 55: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 56: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

protected override async void

as

if

// Create a Frame to act as the navigation context and navigate to the first page

new

// Place the frame in the current Window

if

typeof

// Ensure the current window is active

Page 57: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

Sh

ow

Cre

ate

Setu

p w

ind

ow

co

nte

nt

var

var

await view.Dispatcher

var

var new

typeof

await

Default

Windows sets the size, which

defaults to half.

UseMore

Window uses more than 50% of

horizontal pixels

UseHalf

Window uses half of horizontal

pixels

UseLess

Window uses less than 50% of

horizontal pixels

UseMinimum

Window uses 320 or 500 pixels,

as specified in manifest.

UseNone

Not visible

Page 58: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

shares to search

opens / saves via uses

supplies

is a file source for

Page 59: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 60: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 61: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 62: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

protected override void

protected override void

Always remove your event handlersAlways tear down your event handlers when you’re done with them

Page 63: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

void

var

var

"Share example"

"This demonstrates how to share text to another app"

DeferralsYou need to use deferrals when there is an async operation in the request. Without a deferral in such cases, the request may timeout or otherwise fail. Including it when not needed does no harm.

Page 64: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 65: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

protected override async void

var

if

string await

Be quickYou need to complete the sharing operation as quickly as possible. In many cases, that means spinning up a task to handle the actual work. Use ReportStarted() and ReportCompleted() for lengthy actions.

Page 66: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

async void

string string

new

// For quicklinks, the supported FileTypes and DataFormats are set

// independently from the manifest

await

Page 67: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 68: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 69: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

SettingsFlyout

StackPanel

StackPanel

SettingsFlyout

SettingsFlyoutA content control. Handles navigation chrome and mechanics automatically.

Page 70: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 71: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 72: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 73: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

SearchBox HorizontalAlignment

VerticalAlignment

Width Margin

FocusOnKeyboardInput

ChooseSuggestionOnEnter

PlaceholderText

SearchHistoryEnabled

SearchHistoryContext

SuggestionsRequested

QuerySubmitted

TextBlock FontSize

HorizontalAlignment

VerticalAlignment

x:Name

Page 74: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

private string new string

private void

string

var

foreach string in

Handle the SuggestionsRequested eventFill the Request.SearchSuggestionCollection with your suggestions

Page 75: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

private void

Wire up the QuerySubmitted handlerThis may be done from code or, as was the case here, from markup

Page 76: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

private async void object

var new

var await

foreach var in

// process each contact returned

Using the contact pickerBy default, this code will display the People app’s contact picker UI and allow you to pick one or more contacts from the list.

Page 77: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

First, declare your intentionsAdd the Contact Picker declaration to the package.appxmanifest to tell Windows that your app can provide a contact / people picker to other apps.

Page 78: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

protected override void

if

var

// Create and activate the contact picker page, passing in the activation args

var new

// Show the page

Second, handle activationCheck for contact picker activation in app.xaml.cs in the OnActivated override. This is the same method you’ll use for other types of activation, such as search or share.

Page 79: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

async void

// The event handler may be invoked on a background thread,

// so use the Dispatcher to run the UI-related code on the UI thread.

string

await

foreach in

break

Third, provide a contact picker UI and handle removalThis XAML page will list contacts and enable the user to select/deselect them. Use the passed-in argsand its ContactPickerUI object to handle remove events and update your display.

Page 80: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 81: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

private async void object

var

"Prepare for next session"

"Speaker room"

"Nothing like a little procrastination!"

// get the location for the button, so the popup won’t overlap it

var

Window.Current.Content

var new

var new new

// display the "add appointment" UI

var id = await AppointmentManager.ShowAddAppointmentAsync(

appointment, rect, Windows.UI.Popups.Placement.Above);

// if id is empty, then the appointment was not created

...

Page 82: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 83: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 84: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and
Page 85: Developing Modern Windows 8.1 Store Appdownload.microsoft.com/download/B/8/3/B837A8DD-B470-4AF4... · 2018-10-16 · Rich, integrated search driven by Bing Personalized start and

http://Facebook.com/thewarofit

페이스북: The war of IT

http://sdrv.ms/11igPnr