XAML, 81 Blend for Visual Studio 2013 advantages, 12 opening file, 12–13 Assets tab, 13 Add and Remove methods, 157 Microsoft Advertising SDK, 288
Ads SDK Whether you're developing in HTML or XAML, the Microsoft Advertising NET apps is failure to remove event handlers In some
The existing methods and models of forming predictions and forecasting in recommendation systems were analyzed for solving the problem of advertising selection
It also contains new coverage on integrating ads into your apps, LISTING 1 6 MainPage xaml—Markup with User-Visible English Text Removed
Laying out your UI (Windows Store apps using C#/VB/C++ and XAML) notifications when items get added, removed, or when the whole list is refreshed
21 sept 2007 · number of other applications), or even a simple advertise- Silverlight 1 0 applications are created with a mixture of XAML (Extensible
select the elements either in the designer or the XAML page and delete them editing an ad hoc file, this will be a temporary solution that you can
3796_1session_4_techdays_mini_saturday_1116.pdf
Visual Studio 2013
ࢼлԸરଶখؼ
11ࡖࢂ࣯ࢿ
Developing Modern Windows 8.1
Store App
-ଞ˲ցࢇԻܕઝ̛؆߾ܽࣂչݛઝ̡ࠒࡊٕ
http://www.facebook.com/thewarofit
Rich, integrated search
driven by Bing
Personalized start
and lock screens
New live tile sizes,
including large
Live tile on install
Apps share the screenDeep SkyDrive
integration
APIsPDF 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
StandardsWebGL
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 Webviewcontrols make integration of web-based resources easier and more powerful Faster and richer versions of popular GridViewand ListViewcontrols
Improved StoreApps auto-update by default
New support for gift cards, consumables, and large catalogs Faster app downloads through intelligent resource downloading
ֻҘɼʸо۰߾փΟؿ
8µ JLQGRRV PMNOHPV
ɼشࡓएˈ߅ߢएएփࠝԎɼЕؑ
ؑਫ਼չیࡈݤɾࡵ̛ق
ࢺࢺшˈଥۘ
I7( 3*¬B ҟݦ̛М̛ق
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
User interface
Fundamentals
DevicesGraphics and mediaCommunications and dataServices Geo- location
Proximity
Direct3DDirect2DDirect Write
PlayTo
Contracts
Bing
Azure
Mobile
HTML5/CSSXAMLInputControls
Authentication
Portable
SensorsPlaybackCapture
Printing
SVGCanvas
Local
storageSMS
StreamsBackground
transfer
SyndicationNetworking
XML and
JSON
Skydrive
Live tiles and
toastAccessibilityData binding
Application
servicesThreading/timersMemory managementGlobalizationCryptography
Xbox Live
Updated
User interface
Fundamentals
DevicesGraphics and mediaCommunications and dataServices Geo- location
Proximity
Direct3DDirect2DDirect Write
PlayTo
Contracts
Bing
Azure
Mobile
HTML5/CSSXAMLInputControls
Authentication
Bluetooth
USB
HIDWiFidirect
Point of
service 3D printingScanning WebGL HTTP
Contacts
Appoint-
ments PDF
Speech synthesis
Diagnostics
Portable
SensorsPlaybackCapture
Printing
SVGCanvas
Local
storageSMS
StreamsBackground
transfer
SyndicationNetworking
XML and
JSON
Skydrive
Live tiles and
toastAccessibilityData binding
Application
servicesThreading/timersMemory managementGlobalizationCryptography
Xbox Live
UpdatedNew
Windows 8.1
You can develop for both Windows 8 and Windows 8.1 on Windows 8.1
A free Microsoft account
Paid accounts required only for submission to the
Windows Store
Visual Studio 2013
Use the full-featured paid editions, or build great apps using the free edition for Windows Store development.
Develop in JavaScript, VB, C#, or C++.
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. C++
Windows 8.1 subsystem
Windows Store app using XAML (C++, C#, VB)
AppTheme &
PVLDirect3DDirect-
WriteDirect2DMediaInput
Windows Runtime / XAML
DirectX
XAML
Devices & Entry PointsServices
Bing As A Platform
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
JOHPOHU \RX·UH GHYHORSLQJ LQ +70I
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
Windows 8.1 developer training
XAML UI
Controls
FrameworkElement
TextBlock
RichTextBlock
Control
ContentControl
Border
ButtonBase
Button
ToggleButton
CheckBox
RadioButton
ProgressRing
RangeBaseProgressBar
TextBox,
PasswordBox
RichEditBox
Image
ShapeRectangle, Ellipse
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"
RichTextBlockOverflowContentTarget="{Binding ElementName=SecondColumnOverflow}"
Paragraph
Paragraph
Paragraph
Hyperlink
Hyperlink
Paragraph
Paragraph
InlineUIContainer
Button
InlineUIContainer
Run Run
Paragraph
Paragraph
Run
Paragraph
RichTextBlock
RichTextBlockOverflowx:Name="SecondColumnOverflow"
TextBlock
ProgressRingIsActive="True"
TextBlock
ProgressBarMinimum="0" Maximum="250"Value="50"
TextBlock
ProgressBar
IsIndeterminate="True"
Important!
You must deactivate progress rings and progress bars when not visible.
7OHUH·V M SHUIRUPMQŃH SHQMOP\ LI \RX GR QRPB
PlaceholderText="please enter your first name"/> InputScope="EmailSmtpAddress"/> SelectionHighlightColor="Orange"/> Button
Click="LoadFileButton_Click"
RichEditBoxx:Name="RichTextEditor"
private asyncvoid LoadFileButton_Click(object varnew varawait varawait RichTextEditor.Document.LoadFromStream(TextSetOptions.FormatRtf, stream); 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"
DatePicker
TimePicker
Button
StackPanel
TextBlock
TextBlock
Button
StackPanel
Button
Button
MenuFlyoutItem
MenuFlyoutItem
MenuFlyoutSeparator
ToggleMenuFlyoutItem
ToggleMenuFlyoutItem
Button
{x:Null} TextBlock
Image TextBlock
Image Image.Source
BitmapImageDecodePixelWidth="600"
Image.Source
Image Scale at decode time
Providing a size when loading saves memory as only the bits to be GLVSOM\HG MUH ORMGHG LQ PHPRU\ UHGXŃLQJ \RXU MSS·V RRUNLQJ VHPB Often, this results in higher quality scaling as well. TextBoxGrid.Row="2" Grid.Column="2"
TextBox
TextBoxGrid.Row="1" Grid.Column="2"
TextBox
TextBoxGrid.Row="0" Grid.Column="3"
TextBox
TextBoxRenderTransformOrigin="0.5,0.5"
TextBox
TextBoxRenderTransformOrigin="0.5,0.5"
TextBox
TextBox
RotationX="-70" RotationY="0" RotationZ="10"
GlobalOffsetZ="600"/>
TextBox
Rotate and Move
Skew and Move
3D Transform
Viewbox
GridWidth="170" Height="150">
Ellipse
TextBlock
TextBox
Grid Viewbox
FlipView
FlipView.ItemTemplate
DataTemplate
Grid Image Border
TextBlock
Border
Grid DataTemplate
FlipView.ItemTemplate
FlipView
Data Template
ListView
GridView
SemanticZoom
SemanticZoom.ZoomedInView
SemanticZoom.ZoomedInView
SemanticZoom.ZoomedOutView
SemanticZoom.ZoomedOutView
SemanticZoom
What can be in the views?
The zoomed in and out views are typically GridViewor Hub controls, but do not need to be. The control just needs to implement ISemanticZoomInformation. Windows 8.1 developer training
Windowing and
layout Full landscape
Filled
Snapped
Full portrait
Wider than tall
window Taller than
wide window Taller than
wide window Taller
than wide window Scale with ViewBox
Layout (and scale)
A A AB ABC A B A B VisualStateManager.VisualStateGroups
VisualStateGroup
VisualStatePrimaryLayout
StoryboardStoryboard
VisualState
VisualStateNarrowLayout
StoryboardStoryboard
VisualState
VisualStateTallLayout
StoryboardStoryboard
VisualState
VisualStateExtraLargeLayout
StoryboardStoryboard
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. conststringPrimaryLayout conststring NarrowLayout conststring TallLayout conststring ExtraLargeLayout constdouble constdouble constdouble Use constants
Sizes and state names will almost certainly change during design iterations voidobject if thistrue else if thistrue else if thistrue else thistrue protected override void Window.Current.SizeChanged+= OnWindowSizeChanged;
protected override void Window.Current.SizeChanged-= OnWindowSizeChanged;
Remember to remove those handlers
Tip: 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.
protected override asyncvoid 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 Show Create
Setup window content
var var awaitview.Dispatcher var varnew 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
shares tosearch opens / saves via uses supplies is a file source for protected override void protected override void Always remove your event handlers
$ORM\V PHMU GRRQ \RXU HYHQP OMQGOHUV ROHQ \RX·UH GRQH RLPO POHP void var var "Share example" "This demonstrates how to share text to another app" Deferrals
You need to use deferrals when there is an asyncoperation in the request. Without a deferral in such cases, the request may timeout or otherwise fail. Including it when not needed does no harm. protected override asyncvoid var if stringawait Be quick
You 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. asyncvoid stringstring new // For quicklinks, the supported FileTypesand DataFormatsare set // independently from the manifest await SettingsFlyout
StackPanel
StackPanel
SettingsFlyout
SettingsFlyout
A content control. Handles navigation chrome and mechanics automatically. SearchBoxHorizontalAlignment
VerticalAlignment
WidthMargin
FocusOnKeyboardInput
ChooseSuggestionOnEnter
PlaceholderText
SearchHistoryEnabled
SearchHistoryContext
SuggestionsRequested
QuerySubmitted
TextBlockFontSize
HorizontalAlignment
VerticalAlignment
x:Name private stringnew string private void string var foreachstringin Handle the SuggestionsRequestedevent
Fill the Request.SearchSuggestionCollectionwith your suggestions private void Wire up the QuerySubmittedhandler
This may be done from code or, as was the case here, from markup private asyncvoid object varnew varawait foreachvarin // process each contact returned Using the contact picker
%\ GHIMXOP POLV ŃRGH RLOO GLVSOM\ POH 3HRSOH MSS·V ŃRQPMŃP SLŃNHU 8H MQG MOORR \RX PR SLŃN RQH RU PRUH
contacts from the list. First, declare your intentions
Add the Contact Picker declaration to the package.appxmanifestto tell Windows that your app can provide a contact / people picker to other apps. protected override void if var // Create and activate the contact picker page, passing in the activation args varnew // Show the page Second, handle activation
Check for contact picker activation in app.xaml.csin the OnActivatedoverride. This is the same PHPORG \RX·OO XVH IRU RPOHU P\SHV RI MŃPLYMPLRQ VXŃO MV VHMUŃO RU VOMUHB asyncvoid // 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 foreachin break Third, provide a contact picker UI and handle removal This XAML page will list contacts and enable the user to select/deselect them. Use the passed-in args
and its ContactPickerUIobject to handle remove events and update your display. private asyncvoid object var "Prepare for next session" "Speaker room" "Nothing like a little procrastination!" // get the location for the "--ř - """ Ũ- "" -
var Window.Current.Content
varnew varnewnew // display the "add appointment" UI varid = await AppointmentManager.ShowAddAppointmentAsync( appointment, rect, Windows.UI.Popups.Placement.Above); // if id is empty, then the appointment was not created ... http://Facebook.com/thewarofit ૐࢄݘٓ http://sdrv.ms/11igPnr