上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页
摘要: http://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/br229519.aspx 阅读全文
posted @ 2012-10-09 14:03 博琼 阅读(144) 评论(0) 推荐(0)
摘要: 分享功能在 Win8 平台是一个很重要的内容,这个功能简化了系统间应用的分享操作。记得在 windows phone 上如果要进行内容的分享,比如分享到 新浪微博、腾讯微博、人人等,都需要在自己的应用中引入它们的 SDK,同时增加了学习、调试的成本。而在 win8 平台上,只要按照分享的契约,任何应用都可以似乎分享源、任何应用也都可以接收分享。本示例演示分享源,34、演示分享目标。 分享操作:点击右侧面板超级按钮中的“共享”按钮(快捷键 win键 + H),或者以编程的方式调用。本篇文章中将要使用的 Windows.ApplicationModel.DataTransfer 中的类:name. 阅读全文
posted @ 2012-10-08 18:12 博琼 阅读(823) 评论(0) 推荐(0)
摘要: MSDN :http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.threading.threadpooltimer(v=win.10).aspxnamespace Windows.System.Threading{ // 表示通过 CreateTimer 或 CreatePeriodicTimer 创建的计时器。 public sealed class ThreadPoolTimer { //获取通过 CreateTimer 创建的单用途计时器的超时值。 ... 阅读全文
posted @ 2012-10-08 16:44 博琼 阅读(643) 评论(0) 推荐(0)
摘要: 1、Display the Pictures library in a GridView and ListView 本示例展示怎样把电脑上面的图片库中的文件通过使用 FileInformationFactory 的方式显示在 GridView 和 ListView 控件上。在页面中放置 GridView 控件和 ListView控件(在 UnSnapped 视图下不显示): // Horizontal scrolling grid used in most view states <GridView x:Name="itemGridView" AutomationPr 阅读全文
posted @ 2012-10-08 13:11 博琼 阅读(583) 评论(0) 推荐(0)
摘要: 1、Start StreamSocketListener : StreamSocketListener 将创建一个链接的 'server' 边。它监听一个‘service name’(通常为一个端口号)然后当收到一个链接时调用一个回调,通常是其它应用程序请求建立链接时发生。当收到一个链接,需要再次调用这个 acceptAsync()。操作截图 :点击按钮 'Listen' :页面的 xaml :<TextBox x:Name="ServiceNameForListener" Text="22112" />< 阅读全文
posted @ 2012-09-29 13:02 博琼 阅读(495) 评论(0) 推荐(0)
摘要: 本篇讲述通过 MessageWebSocket 通信,服务器端是 aspx 的网站。MessageWebSocket 和 Socket 大同小异。附上位于 Windows.Networking.Sockets 命名空间下的 MessageWebSocket 类的定义 :View Code // 摘要: // 支持允许使用 WebSocket 的读取和写入整个消息的网络通信。 [Activatable(100794368)] [DualApiPartition(version = 100794368)] [MarshalingBehavior(Marsha... 阅读全文
posted @ 2012-09-28 13:10 博琼 阅读(2790) 评论(1) 推荐(1)
摘要: 下面示例中将要使用的公共类: //用于 picker 选择文件时,进行文件过滤internal class FileExtensions { public static readonly string[] Document = new string[] { ".doc", ".xls", ".ppt", ".docx", ".xlsx", ".pptx", ".pdf", ".txt", ".rtf" }; publ 阅读全文
posted @ 2012-09-27 13:10 博琼 阅读(587) 评论(0) 推荐(0)
摘要: 1、Pick a single photo : 提示用户选择一张单独的图片。操作截图:点击按钮,打开 win8 的文件选择器 :显示结果 :相应的 xaml :<Button Grid.Row="1" x:Name="PickAFileButton" Content="Pick photo" Click="PickAFileButton_Click"/> <TextBlock x:Name="OutputTextBlock" TextWrapping="Wrap&qu 阅读全文
posted @ 2012-09-26 17:56 博琼 阅读(865) 评论(0) 推荐(0)
摘要: 1、Creating a file : 在本例中创建一个新的名为 "sample.dat" 的文件。这个文件创建在文档文件 (document library) 夹下。页面中的 xaml : <Button Grid.Row="1" x:Name="CreateFileButton" Content="Create 'sample.dat'" Click="CreateFileButton_Click"/>相应的 C# : public StorageFile sam 阅读全文
posted @ 2012-09-26 16:34 博琼 阅读(507) 评论(0) 推荐(0)
摘要: 1、Read and write simple structured data: 这个示例演示了创建一个内存支持的流,然后通过使用 DataWrite 对象把下面的字符串存储到流中。一旦这个操作完成了,再使用一个 DataReader 对象把这些字符串从这个流中提取出来。操作截图:点击按钮后,显示结果:页面的 xaml://将要操作的文本 <TextBlock x:Name="ElementsToWrite" > Hello;World;1 2 3 4 5;Très bien!;Goodbye </TextBlock> <Button 阅读全文
posted @ 2012-09-25 15:28 博琼 阅读(478) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 23 下一页