微软客户端技术纵览
TRANSCRIPT
Surface Hardware
Windows 7
Surface Hardware
Windows VistaWindows 7
NativeWin32
Application
WPF 3.5
Surface SDK1.0
Managed Wrapper and Interop
Managed Wrapper and Interop
WinForms Application
WPF 3.5 SP1
WPF 4.0
Surface SDK2.0
WPF Application
Surface Application
Multi-Touch Controls
Multi-Touch API
Surface Multi-Touch
Controls & API
Multi-Touch API
Multi-Touch API and Controls
多点触摸的开发技术路线图
Good Better BestAPIs For Free!
•Panning/zoom gestures•Right click gesture
•Gesture notifications•Pan/zoom/rotate/etc
•Raw touch data•Manipulation and
Inertia processors
Native Win32
•Controls with standard scrollbars
•WM_GESTURE message •WM_TOUCH•COM based
Manipulation and Inertia Processors
WPF •WPF 4.0 pan support in ScrollViewer
•Gesture events• Inertia configuration
• Touch events•Manipulation and Inertia
Processors
WinForms •Controls with standard scrollbars
•WM_GESTURE message• P/Invoke
•Manipulation and Inertia Processors in Microsoft.Ink.DLL•Real-time Stylus or Ink
Collector
多点触摸的开发 API 选择
Windows 7 的任务条
Enhanced Taskbar Jump Lists Thumbnail Toolbars Custom Switchers Icons Overlay Icons Progress Bars
Destinations(“nouns”)
Tasks(“verbs”)
Known categories
Custom categories
User Tasks
Taskbar Tasks
Pinned category
Windows 7 Taskbar – Jump Lists
自定义 Jump ListStep 1: Hello World
• 把程序跟文档进行关联• 文件对话框• 最近打开的文档列表
SHAddToRecentDocs(SHARDW_PATH, "file.ext");
RH.RegisterFileAssociations(...);OpenFileDialog ofd = ...; ofd.ShowDialog();JumpListManager jlm = ...;jlm.AddToRecent("file.ext");
自定义 Jump List Step 2: 添加任务
• 用户希望– 以特定的参数或者命令行启动应用程序– 启动其他应用程序
• IShellLink objects– 可以包括参数、工作路径、图标等
自定义 Jump List Step 2: 添加任务
IObjectCollection* poc = ...;IShellLink* task = ...;poc.AddObject(task);ICustomDestinationList* pcdl = ...;pcdl.BeginList(...);IObjectArray* poa = ... poc;pcdl.AddUserTasks(poa);pcdl.CommitList();
JumpListManager jlm = ...;jlm.AddTask(new ShellLink { Path=..., ... });
自定义 Jump List Step 3: 添加类别
• 文档需要分类嘛?– 常用文档不够用?– E.g. Inbox, Outbox, Sales, Marketing …
• IShellItem or IShellLink objects
自定义 Jump List Step 3: 添加类别
IObjectCollection* poc = ...;IShellItem* item = ...;poc.AddObject(item);ICustomDestinationList* pcdl = ...;pcdl.BeginList(...);IObjectArray* poa = ... poc;pcdl.AppendCategory(L"Sales", poa);pcdl.CommitList();JumpListManager jlm = ...;jlm.AddCustomDestination( new ShellItem { Path=..., Category=... });
Application Menu
Quick Access Toolbar
Tab Contextual Tab SetContextual Tab
Help
Group (aka “Chunk”) Dialog Launcher
• Windows 7 内置, Vista 可以安装• 使用 Win32 API• 与 Office 2007/WPF Ribbon 类似
Windows Ribbon
Microsoft’s Ribbon Strategy
MFC ScenicWPF
Target:Managed
Target:MFC native
Target:Native
needs .NET 3.5 Win2K or newer Vista or newer
Office 2007 & Windows styles
Office 2007 & Windows styles1
Windows visual style
Coming soon…Official release in 2009
Available now in Visual Studio 2008 SP1
Coming soon…Ships with Windows 7
Windows Ribbon 的路线图
Categorized Menus
Tabs & Groups
Color Pickers
Mini Toolbar &Contextual Menu
Dropdown GalleriesTooltips
Check Boxes
Spinners
Font Control
Group Dialog Launchers
“In-Ribbon” Galleries
Combo Boxes
Buttons & Split Buttons
Windows Ribbon 的控件
How Federated Search Works
富文本 (Rich client) 体验 预览 , 元数据 , 拖拽 浏览器友好
简单和轻量级的集成 无需客户端代码 任意的服务器平台
基于标准的 OpenSearch 1.1 RSS and ATOM
认证 集成认证或自定义
1. Search Connector (.osdx) Installed
2. Windows sends search terms as HTTP request
3. RSS results returned from server
Federated Search
你的搜索源应该 : 接受 URL 请求
例如 : http://www.contoso.com/q={searchTerms} 定义 Rich Items 返回 RSS 格式结果
Windows 7 的实现 : XML 搜索容器 属性匹配 (Property mapping)
例如 : BookAuthor System.Author 缩略图和预览 自定义视图
兼 容 W3C 标 准 改 进 对 RSS , CSS , A JAX 的 支 持 优 化 J avaSc r ip t 性 能 。 新 增 加 速 器 , 网 页 快 讯 以 及 可 视 化 搜 索 隐 私 浏 览 和 SmarSc reen 反 仿 冒 过 滤
Accelerators 的流程
OpenService XML Description
Serialize Content
Navigate URL
HTML
在加速器中预览
视图中的结果
安装加速器Accelerato
rs选中内容
选择加速器Accelerato
rs
执行Accelerato
rs
转到服务页面
OpenService 的格式<?xml version="1.0" encoding="utf-8" ?> <openServiceDescription
xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0"> <homepageUrl>http://maps.live.com</homepageUrl> <display> <name>Map with Live Maps</name> <icon>http://maps.live.com/favicon.ico</icon> </display> <activity category="Map"> <activityAction context="selection"> <execute method="get“
action="http://maps.live.com/default.aspx?where1={selection}" /> <preview method="get" action="http://maps.live.com/geotager.aspx"> <parameter name="b" value="{selection}" />
<parameter name="clean" value="true" /> <parameter name="w" value="320" /> <parameter name="h" value="240" /> <parameter name="format" value="full" />
</preview> </activityAction> </activity></openServiceDescription>
Accelerators 的部署
//check the user agent string if client is MSIE 8.0//for more info:
http://msdn2.microsoft.com/en-us/library/ms537509.aspx
//check whether service is already installed
window.external.IsServiceInstalled(‘http://maps.live.com/livemaps.xml’, ‘map’);
//if false, display button to add service
window.external.AddService(‘http://maps.live.com/liveMaps.xml’) ;
回家作业
1. 考虑如何用 Accelerators 与你的网站服务进行结合
2. 创建一个 OpenService 格式的 Accelerators
3. 广而告之,找人安装使用你的 Accelerators
参考资料: http://www.microsoft.com/windows/internet-explorer/beta/features/accelerators.aspx
最简单的例子
<div class=”hslice” id=”1” >
<p class=”entry-title”>Amazon Kindle, Unopened</p><div class=”entry-content”>
<img src=”pic.jpg”><p>Current bid: US $282.11</p>
</div></div>
Top-Level NotificationBold on updated contentItalic for expiring contentGrey on expired content & errors
Details FlyoutHTML extracted from webpage (static content)Imported basic HTML stylingClick-thru access to website
Favorites BarContains Favorite links, feeds, &WebSlices Organize content through folders
WebSlices 的工作流程
Windows Feeds Platform supports feeds and WebSlices
Converts WebSlice HTML as Atom feed
Sanitizes content no script basic styling: imported stylesheet,
style blocks, & direct styles
Content stored locally, accessible by Feed API
Download Feed (XML)
Download HTML with WebSlice
Convert to Atom Feed (XML)
Feed Parser
compare downloaded
data with stored data
Mark Feed as Updated
`
Download Engine
如何实现 WebSlices
将你提供webSlices订阅的网页内容,放在一个 class为“ entry-content” 的容器内,当浏览器将鼠标移动到这个区域就会出现 webSlices 的订阅图标。
回家作业
如果你有网站 , 不要犹豫 :不需要任何客户端的代码用户会得到更新提醒WebSlices鼓励用户点击进入网站
参考资源: http://www.microsoft.com/windows/internet-explorer/beta/features/web-slices.aspx
Silverlight 2 的运行时功能2D, GraphicsAudio, VideoAnimationsText, Text Input*Controls*Layout*Styles/Templates*Data Binding*NetworkingHTTP/S and Sockets*
* New in Silverlight 2
.NET Support*C# and VB.NET*LINQ*XML APIs*Generics*HTML Integration*JSON SerializerLocal storage*Crypto APIs (AES)*Threading*
演 示Deepzoom 和 Hard Rock Memorabiliahttp://memorabilia.hardrock.com/
演 示淘宝网闪光店铺http://list.mall.taobao.com/promotion/activity/silverlight.htm
资源链接
http://blogs.technet.com/fyu
www.microsoft.com/windows
http://www.microsoft.com/ie7
http://www.silverlight.com/
© 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.