background preloader

Windows phone

Facebook Twitter

The Will Will Web | 記載著 Will 在網路世界的學習心得與技術分享. 零元學Expression Blend 4 - Chapter 45 ListBox裡的物件不能換行嗎? - 小猴子點部落. ListBox裡的排列不是垂直就是水平,覺得這樣的排列很枯燥乏味嗎? 想要它變聰明嗎? 看下去就對了~ 先前在【Flash做的到的Blend也可以! 輕鬆製作擁有動畫的MenuBar! 使用了WrapPanel做為第二層選單的佈局容器 另外,在設計x程式社團,也有朋友問到有關WrapPanel的問題 我就一起在這裡做介紹 在開始本章之前,要先提醒朋友~ 如果你還沒有裝Silverlight Toolkit的話,請先下載,才會有本章提到的WrapPanel唷! 針對Silverlight Toolkit,小猴子先前有特別做了詳細的介紹。 (請看【擴充元件-「Silverlight Toolkit」教學】) 在主要工作區置入一個ListBox,並調整到適當位置 接著我們運用假資料的代入,來測試佈局容器內物件的排序狀況 於Data->Creat Sample Data->New Sample Data開始我們的Sample Data建置 有關更詳細的Sample Data如何使用 請看小猴子先前所做的詳細介紹: 【零元學Expression Blend 4 - Chapter 31 看如何簡單的把SampleData 綁進ListBox裡】 這裡,我們設定一組的Property就好,並且把Type改為Image 點選Collection後直接拖拉進ListBox裡,ListBox就會出現剛剛所設定的SampleData了 放入Sample Data的ListBox,出現了VerticalScrollBar 讓我們進到Template裡面,看看發生什麼事 ListBox->Edit Additional Templates->Edit Layout of Items->Create Empty 原來是預設的ListBox裡面住了個StackPanel阿!!! 沒關係,我們來幫它變身~ 點選StackPanel->右鍵->Change Layout Type->WrapPanel 變身為WrapPanel後,除了圖片改為橫向排列外,好像沒甚麼差別 沒關係,不要緊~讓我們先離開Edit Template模式再說 在這邊,我必須要先介紹WrapPanel特性: WrapPanel會將子項目由左至右依序放置,在包含方塊的邊緣將內容換行。

依據 Orientation 屬性的值,後續的排列方式會由上至下或由右至左依序進行。 ListBox优化初步(一) - 阿干@NET. 在书中圣的版本更新历程中,碰到了诸多问题,其中一个就是ListBox当使用WrapPanel时的性能问题 WrapPanel不是原生控件,它来自于 使用它可以实现ListBox的多列布局(如图一),但是它是不支持虚拟化的,关于虚拟化,请自行搜索相关资料。 这里简单提一下,虚拟化分为视觉虚拟化和数据虚拟化,这里我们只关注视觉虚拟化,以下提到的虚拟化也都特指视觉虚拟化 虚拟化可以让ListBox(ItemsControl)的项只有位于显示区域时才去渲染,大大节约了内存和CPU/GPU消耗,对于大量数据可以说是必须的 ListBox的默认的ItemsPanel容器是VirtualizingStackPanel,从名字可以看出是支持虚拟化的,但是WrapPanel不支持虚拟化,它继承自Panel,所以当你的ListBox的ItemsPanel的容器替换成WrapPanel后也就失去了虚拟化的能力,当数据变得很多时就会非常的卡 那么如何解决呢?

这里我们介绍第二种方式 那么如何使一行容纳多个数据呢? 当时经过一番Google后发现已经有人解决了该问题,呃,抱歉时间有点长了,原文找不到了,这里将他的代码给出,我自己写的就不献丑啦 其原理是将一个长列表,切分成若干个长度为列数的小列表,下面是实现代码: 那么如何使用呢? This.demoList.ItemsSource = new RowAdapter<string>(DataGen.Gen(), 2); 大家可以对比我的Demo,使用WrapPanel和使用这种切分方式,性能相差非常大 Demo下载: 我的另一个产品博客,关于桌面小工具和Windows Phone 7应用作品的,欢迎访问: Part 47 - Windows Phone 7 - WrapPanel. In this article I will discuss about the WrapPanel crontrol in Window Phone 7.

WrapPanel comes along with Silverlight Windows Phone Toolkit. WrapPanel become very handy when you have to create series of tiles whether it is vertical or horizontal. It wouldn't be easy to create a series of tile without WrapPanel. Let's see how we can use WrapPanel. Download Silverlight Windows Phone Toolkit Step 1: Create a silverlight for Windows Phone project. Step 2: Add reference of Microsoft.Phone.Controls.Toolkit.dll Step 3: Add namespace of Microsoft.Phone.Controls.Toolkit in MainPage.xaml. xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" Step 4: Place below code of WrapPanel inside ContentPanel of MainPage.xaml Now, run the application, you will get all the rectangles placed inside WrapPanel like below.

Orientation - Horizontal Orientation - Vertical FlowDirection="LeftToRight" or lowDirection="RightToLeft" .NET菜鳥自救會. Windows Phone 7 Native Database Programming via Sqlite Client for Windows Phone. In this article I will introduce to you a new, strong and easy-to-use native database solution, called Sqlite Client for Windows Phone, provided by CodePlex, together with other associated programming tips. Introduction Either from a user's perspective or from a developer's perspective, Windows Phone 7 has brought us dozens of new and exciting features. At the same time, there are also numerous missing features in the current Windows Phone 7 Series expected by various kinds of users.

One of the representative regrets may be lacking local database API – the current Windows Phone 7 OS only supports access to data via XML, Isolated Storage, and Cloud Storage. Do we really have no other choice? Note although there have been several efforts to create Windows Phone 7 databases, in the end, these all run on top of isolated storage. Introduction to Sqlite Client for Windows Phone As is well-known, SQLite is a famous open sourced embedded database system, already supported on iOS and Android. 08. 微 WP7本地 之Sqlite 程技巧-科技 道-和. 在上一篇文章中我們簡要介紹了Sqlite Client for Windows Phone的主要功能及相關的輔助開發工具。 特別註意的是,我們通過工具類DBHelper實現了SQLite數據庫與WP7系統本地存儲功能的關聯。 在本篇文章中,我們將著手構建一個簡單的Windows Phone 7客戶端應用程序,並將具體探討Sqlite Client for Windows Phone在WP7開發中的基本應用思路和相關編程技巧。 本系列文章中的案例程序調試環境: 1.

Windows 7; 3. 4. 5. 6. 7. 一、構建簡易數據驅動型WP7客戶信息編輯器 啟動Visual Studio 2010中創建一個簡單的Windows Phone 7應用程序,並命名為WP7SQLiteClient。 1.運行時的截圖預覽 為了能夠更好地了解後文的解釋,讓我們首先看一下示例程序的運行時快照,如圖1和2所示。 圖1. 註意到,在最初的客戶編輯器截圖中只提供了三個使用Sqlite Manager工具創建的記錄。 圖2. 現在,按下圖中的按鈕“Del Last 1”,則數據庫database1.sqlite中Customer表格中的最後一個記錄將被刪除。 圖3. 接下來,讓我們看看後臺代碼中的具體編程技術。 2.後臺代碼編程 首先,為了實現數據庫的全局訪問的方便(例如從每一個子頁面中訪問數據庫),我們最好在App類中定義一個公共屬性db。 清單2:在App類中定義一個公共屬性db方便數據庫訪問 public partial class App : Application private DBHelper _db; public DBHelper db get Assembly assem = Assembly.GetExecutingAssembly(); if (_db == null) _db = new DBHelper(assem.FullName.Substring(0, assem.FullName.IndexOf(",")), "database1.sqlite"); return _db; / / ...其他省略 註意到,公共屬性db關聯到上文中的工具類DBHelper。

上述短短的代碼足矣。 清單3: / /其他省略... using WP7SQLiteClient.Dal; using SQLiteClient; 微 WP7本地 之Sqlite 程技巧-科技 道-和. 無論是從用戶的角度來看還是從開發人員的角度來看,Windows Phone 7給我們帶來眾多的新的和令人振奮的功能。 與此同時,當前的Windows Phone 7系列也的確存在令許多用戶失望的缺憾。 一個代表性的遺憾便是,Windows Phone 7缺乏本地數據庫API支持—當前的Windows Phone 7操作系統僅提供通過XML、客戶端獨立存儲和雲存儲等幾種有限的數據訪問支持。 那麽,就本地數據庫功能來說,我們真的有沒有其他的選擇了嗎? 當然不是這樣。 如今各種開源社團如火如荼,已經有一些開發人員和團隊一直努力在填補這一方面的空白。

請註意,盡管目前已有多個嘗試實現了Windows Phone 7本地數據庫支持,但最後,這些系統都需要運行於Windows Phone 7提供的獨立存儲基礎之上。 在本系列文章中,我將向你介紹上述成員之一-Sqlite Client for Windows Phone。 [備註]本系列文章中的案例程序調試環境包括: 1. 3. 4. 5. 6. 7. 一、Sqlite Client for Windows Phone簡介 大家都知道,SQLite是一個著名的開源的嵌入式的數據庫系統,目前已經提供對於iOS和Android的良好支持。 圖1. Sqlite Client for Windows Phone進行大範圍的更新,如提供對於布爾類型、大型數據(Blobs)以及事務的全面支持,此外,下載包中還一並提供了一個全面的示例,供開發者學習之用。 圖2. 接下來的操作就很簡單了:重新構建源碼工程,得到一個程序集Community.CsharpSqlite.WP.dll(Release版本大小是525 KB)。 二、Sqlite Client for Windows Phone基礎類庫剖析 如果您以前有過任何基於SQL腳本的數據庫編程經驗,那麽您可以輕松地使用Sqlite Client for Windows Phone功能。 圖3. 圖4. 圖5. 怎麽樣! 先別急,在正式使用Sqlite Client for Windows Phone之前,有必要再向您介紹另外一個非常有用的工具,名為sqlite-manager ( 1.使用SQLite Manager簡化數據庫管理 圖6. Try. [Windows Phone] 使用SqlLite ( 摸摸碴 - 社群文章 ) Beginning Windows Phone 7 Development - Henry Lee, Eugene Chuvyrov. Microsoft is injecting new energy into the smart phone marketplace with the sophisticated Windows Phone 7. This new energy equates to new opportunities for you, the mobile developer.

Beginning Windows Phone 7 Development has been written specifically to help you seize these opportunities and begin creating applications for this exciting new mobile device platform. Beginning Windows Phone 7 Development starts with the basics, walking you through the process of downloading and setting up the right development tools, including Visual Studio, Expression Blend, Silverlight SDK, and Windows Phone SDK.

The book then takes you step-by-step though the development process as you build and deploy a complete application with a highly sophisticated user interface. This book is for anyone interested in developing applications for the Windows Phone 7. If you have an understanding of basic .NET coding practices then this book if for you. 机微网《Windows Phone 7教程1.0 》超过500篇文章 - 林建洪. Windows Phone开发论坛,wp7开发,游戏开发,windows phone开发教程,视频教程,工具文档,代码仓库,开发者问答_codewp7.com - 卤面网. Windows Phone 7 / Windows Phone 7学习教程_银光中国 Silverlight 资源 社区 论坛. Cocos2d for Xna与Silverlight兼容 日期:2013-02-27 20:27:16 点击:147 好评:0 引子:最近一直在解决Cocos2d框架的兼容性问题,那么索性也介绍下Cocos2d在WindowsPhone的Cocos2d for Xna的一些兼容性问题 背景:Cocos2d for Xna是国人开发的一款使用Xna内核并结合cocos2d api的一款cocos2d 家族游戏框架,总体上来说,这款框架为.Net程序员开发windowsphone游戏提供了极大的便利,但是其内核亦有一些致...

一个Pan&Zoom的Behavior 日期:2013-02-27 20:11:53 点击:124 好评:0 PanZoom是个很常用的操作,但是不想每次都去重新写各种GerstureListener事件,所以就参考这篇 文章 ,改写了个简单的Behavior。 Public class ZoomAndPanBehavior2 : BehaviorImage { private Image _currentImage { get { return AssociatedObject as Image; } } priva... Windows Phone 调整屏幕亮度的简单实现 日期:2013-02-27 20:08:47 点击:195 好评:0 之前看到以及其它应用都有调节屏幕亮度的功能,还以为MS有相关的API,就去MSDN找了下,但是怎么都找不到。 今天突然想到做自定义MessageBox时,由于要突出弹出框部分,所以会改变LayoutRoot的opacity属性,以达到屏幕暗下来的效果,于是马上试了下,结果是可行的。 Windows Phone 8 中 WIC, Direct2D, DirectWrite替代方案 (Direct3D 1 日期:2013-02-26 01:56:41 点击:68 好评:0 由于Windows Phone 8 不支持 WIC, Direct2D, DirectWrite.

分享Silverlight/WPF/Windows Phone/HTML5一周学习导读(11月28日-12月4日) - 专注Silverlight. 分享Silverlight/WPF/Windows Phone/HTML5一周学习导读(11月28日-12月4日) Windows Phone 7.5 Data Cookbook,该书详细介绍Windows Phone 7.5应用开发数据操作方法和技巧。 书中介绍目前几种Windows Phone应用数据交互方法,使用实例介绍Windows Phone 7.5应用开发时数据处理技巧。 该书适合Windows Phone应用开发人员参考阅读。 书籍下载 欢迎大家加入“专注Silverlight”QQ技术群,欢迎大家加入一起学习讨论Silverlight&WPF&Widnows Phone开发技术。 22308706(一群) 超级群500人 37891947(二群) 超级群500人 100844510(三群) 高级群200人 32679922(四群) 超级群500人 23413513(五群) 高级群200人 32679955(六群) 超级群500人 61267622(七群) 超级群500人 88585140(八群) 超级群500人 128043302(九群 企业应用开发推荐群) 高级群200人 101364438(十群) 超级群500人 68435160(十一群 企业应用开发推荐群)超级群500人. Windows Phone 7 快速上手指南 ( 含學習資源整理 ) 為了替同事賺取 Tech Days 2010 門票,不得不下海撰寫 Windows Phone 7 文章,不過自己也是對 WP7 有興趣啦,所以趁著假日把研究的過程做個紀錄,希望對初學者有幫助。 另外,由於目前 Expression 4 已經推出正式版,我在研究的過程發現網路上有些資訊已經不太正確,所以也剛可以透過此篇文章提供較為正確的快速上手指南。

首先,要開始開發 Windows Phone 7 應用程式必須先符合以下基本條件,並先安裝好 2 個軟體: Windows Vista SP2 以上作業系統 ( 含 Windows 7 ).NET Framework 4Windows Phone Developer Tools RTW ( 此開發工具套件包含以下工具,皆為免費軟體 ) Visual Studio 2010 Express for Windows PhoneWindows Phone Emulator ResourcesSilverlight 4 Tools For Visual StudioMicrosoft Expression Blend for Windows PhoneXNA Game Studio 4.0Windows Phone Developer Tools October 2010 Update ( 2010 年 10 月份推出的更新套件 ) 如果想學習如何開發 Windows Phone 7 建議可以參考本文最後的【學習資源整理】相信很快就會上手。 以下是利用 Windows Phone Developer Tools 開發工具 ( 亦即 Visual Studio 2010 Express for Windows Phone + Microsoft Expression Blend for Windows Phone ) 建立一個「音樂點唱機」應用程式,並使用內建的 Windows Phone 7 模擬器來執行。

第一步:在 Visual Studio 2010 中新增一個 Windows Phone Application 專案 第二步:瞭解預設專案範本的內容 以下是方案總管裡各項目的說明: 在專案屬性裡有一些 Windows Phone 7 應用程式專屬的屬性設定: 以下是第一次成功執行時的畫面: ++==== 學習資源整理 ====++ 官方網站. Windows Phone 7.5 (Mango) 開發學習資源整理. Designer Silverlight » Blog Archive » Tutorial: Logging Into Facebook with Windows Phone 7 (Silverlight) UPDATE: This tutorial will no longer work.

I’ve updated it (as of late July 2012) at my new blog 25 New Things as my first “new thing” . So, you want to use Facebook to sign into something or in some way integrate Facebook with your Windows Phone 7 app. You are in luck because it is almost hilariously easy. I’ve uploaded this tutorial as a zip file. I tried to github it, but I’m inching up on 1 hour of trying to figure out what the hell I’m doing wrong. Download this Tutorial Project I’ve tried to make this a full featured tutorial, so if you just want to get to the code, head down to the “Let the User Login To Facebook” section. Get Your Facebook Key Go to and log in with your Facebook account. Fill in the App Display Name and the App Namespace and do the verification. Don’t worry about anything else here… you don’t need to select anything in the “how your app integrates with Facebook” section to do this tutorial.

Add Facebook C# SDK Build Facebook Login UI. Windows Phone 7 - Local Database概論 - 1 - Pou's IT Life. 去年剛在WP7被釋放出來之後,我在研究WP7上使用資料庫的文章後,有產出<Windows Phone 7 – 下載檔案至Isolated Storage>文章, 當時是使用Isolated Stroage結合SQLite Library產生新的資料庫(或用下載)放置於Isolated Stroage進行使用。 等到今天,終於在Mango 發出API項目資訊後,可以開始研究由MS所提供的API,使用LINQ to SQL操作Local Database(其實相似SQL CE)。 WP 7.1開始允許儲存關聯(relational)資料在local database中,local database放置的位置不意外被放置於Isolated Storage, 放置放Isolated Storage操作起來不困難,但這跟以前操作SQL CE資料庫是比較不一樣的,因為它統一使用LINQ to SQL完成所有動作, 包括:建立Schema、操作資料、存取實際的database file。 這樣的使用方法不是沒有道理的,LINQ to SQL協助我們把底層資料與操作層分開來,透過IEnumable<T>實作的類別與物件導向的設計概念, 配合Lambda語言,讓我們操作起來不需要去在意實際的SQL或資料結構,只要注意Lambda不要找出null大部分的任務都可以完成。 對於LINQ To SQL比較不熟悉的話,可以參考<[超簡單入門]VS 2008 + LINQ-to-SQL,不用寫程式,一次搞定。

以下將仔細說明LINQ To SQL在WP7怎用操作Local Database: 〉LINQ To SQL in WP7: 根據MSDN提供的文件,Linq to SQL in WP7中的架構,可以透下圖來加以說明: 從上圖可以看出我們撰寫的App裡需要為想操作的Local Database,建立一個對應的DataContext物件讓操作邏輯可以直接編寫於該物件 上面,不需要去在意底層怎麼轉成可能SQL或組合語言,將這些轉換與對應的事情交給LINQ to SQL Runtime去負責即可。 但這只是大略的說明,接下來針對幾個重要的元件做一些說明: (A) DataContext: 是以一個中間層的方式存在著。 這也是ORM概念實作的方式,例如:Entity Framework或LINQ to SQL。 (b-1).