【正文】
種顯示形式、數(shù)據(jù)捆綁、空值處理和跟蹤用戶單元選擇的事件。LinkLabelLinkLabel控制是一個能顯示一個或更多超鏈接的標簽控制。SplitterSplitter控制是一個提供恢復相接控制的能力的分離欄。ToolBarToolBar控制是能將圖像以按鈕形式顯示的Windows工具欄。用戶控制.NET Compact 。增加用戶控制的同時,.NETCompactFramework Studio 2005圖像化地創(chuàng)建控制,并且, Framework一樣,.NET Compact ,而且可以用拖放安置在窗體上。顯示和布局管理現(xiàn)在可用的Windows Mobile窗體因素的廣泛多樣性,要求應(yīng)用程序開發(fā)者開發(fā)應(yīng)用程序用戶界面比以前更動態(tài)化。為了簡化創(chuàng)造動態(tài)用戶界面的任務(wù),.NET Compact ??刂葡嘟?NET Compact 。相接一個控制設(shè)置它與雙親控制的邊緣相反,即填充邊緣。因為雙親控制調(diào)整尺寸,相接控制自動調(diào)整尺寸來填充雙親控制指定的邊緣??刂埔部梢韵嘟犹钛b整個雙親??刂仆?NET Compact 。停滯控制識別,即控制的一邊或多邊應(yīng)該依然是與對應(yīng)的邊緣或雙親控制的邊緣保持的一個固定距離。因為雙親控制調(diào)整尺寸,控制自動地調(diào)整尺寸,因此控制的停滯的一邊依然是與雙親控制的對應(yīng)的邊緣保持的適當?shù)木嚯x。自動卷曲Form and Panel控制——除了繼承于ScrollableControl控制的其他控制——現(xiàn)在提供AutoScroll屬性。當設(shè)置為真,控制自動地提供一個卷曲欄來允許用戶卷曲到任一個在控制可視范圍之外的孩子控制。自動縮放比例所有ContainerControl起源的控制,譬如Form控制,現(xiàn)在提供AutoScaleMode屬性。AutoScaleMode屬性指出當控制在一個不同于最初它設(shè)計的決議上顯示時,控制應(yīng)該如何反映。,容器控制的所有孩子控制相應(yīng)地與執(zhí)行時間的顯示決議相匹配。,這樣就使應(yīng)用程序有責任在不同的決議上準確地提出。SuspendLayout和ResumeLayout.NET Compact Control類現(xiàn)在支持SuspendLayout和ResumeLayout 方法。,這些方法在與一個異于聚集布局事件關(guān)聯(lián),譬如改變一系列的孩子控制的位置或調(diào)整它們的尺寸。Graphics DpiX和DpiY屬性現(xiàn)在,Graphics類提供關(guān)于當前設(shè)備顯示的決議的信息。DpiX 屬性顯示水平的每英寸像素的數(shù)量, 而且DpiY屬性顯示垂直的每英寸像素的數(shù)量。自定義圖畫為了簡化豐富的用戶界面的創(chuàng)作,.NET Compact 。這些特性允許應(yīng)用程序更加容易運用自定義圖畫??尚D(zhuǎn)的字體 Compact ,以及為合并其他文本作用提供支持。自定義筆現(xiàn)在,應(yīng)用程序可以創(chuàng)造具體顏色和大小的筆。位圖.NET Compact 。這種改進包括:當創(chuàng)建位圖和有能力將一個位圖保存到一個文件或流時,提供更多的選擇。應(yīng)用程序可以運用新加入的BitmapData類,通過LockBits和UnlockBits方法的聯(lián)合更加容易觀察和操作位圖。因為應(yīng)用程序需要在被處理的和自身的代碼之間分享位圖,現(xiàn)在,你可以通過GetHbitmap方法檢索一個自身位圖對象的句柄。DirectXWindowsMobile(APIs)包含二維和三維的圖畫特性。CompactFramework——瞄準WindowsMobile,DirectX特性集有能力貫穿包含在“”命名域中的類和對應(yīng)的匯編。鍵盤管理現(xiàn)在,靈活的設(shè)備的一個增長數(shù)字包括鍵盤。為了允許管理開發(fā)商利用可利用的鍵盤,.NET Compact 。 注: Compact ,但在這里提它們,大家就肯定知道它們也是可用的。制表符支持現(xiàn)在,控制支持制表符命令以允許應(yīng)用程序用戶通過按制表符鍵在控制之間切換。Keyboard 現(xiàn)在,控制接受KeyUp、KeyDown和KeyPress事件。此外,現(xiàn)在,F(xiàn)orm控制提供KeyPreview屬性。當設(shè)置為假, keyboard事件就會被直接發(fā)到控制。當KeyPreview被設(shè)置為真,所有keyboard事件就會被發(fā)到Form實例以等待被發(fā)送到當前聚焦的控制。通過在Form實例的對應(yīng)的事件處理設(shè)置KeyPressEventArgs屬性為真,F(xiàn)orm實例可以防止事件以焦點被送到控制。數(shù)據(jù)當然,數(shù)據(jù)是任一個應(yīng)用程序的重要部份。不管有無關(guān)系,針對數(shù)據(jù)的類在必需訪問和運作以數(shù)據(jù)編程的努力上的水平有直接效應(yīng)。.NET 除了為現(xiàn)存的類提供新特性,還提供很多新數(shù)據(jù)類。Updatable, Scrollable Access to SQLServer2005 Mobile Edition .NET Compact Server2005 Mobile Edition (SQLMobile)數(shù)據(jù)庫——SqlCeResultSet提供新類。新的SqlCeResultSet類提供卷曲和可更新的直接存取SQL Mobile數(shù)據(jù)庫。這個存取為存取SQL Mobile數(shù)據(jù)提供一種比DatasSet類更加快速和更加資源高效率的解決方案。和DataSet類一樣,SqlCeResultSet可以作為數(shù)據(jù)綁定資源使用。DataSetDataSet類和相關(guān)的類提供很多新特性。 Compact Framework的 Framework更多協(xié)調(diào)。GetChanges和Merge Methods.NET Compact 將GetChanges和Merge方法增加到DataSet類。 GetChanges方法返回一個包含所有自從最后訪問AcceptChanges之后的所有變動的DataSet的副本。返回的DataSet優(yōu)化為合并。DataSet方法將DataSet合并到另一個里。它對于將變動從一個由一個GetChanges方法返回的DataSet合并到另一個特別有用。Copy方法現(xiàn)在,. NET Compact Framework 的DataSet類提供Copy方法。Copy方法返回包含與原物相同的結(jié)構(gòu)和數(shù)據(jù)的新DataSet。DataTables Serialization現(xiàn)在,DataTable類提供WriteXml和ReadXml方法。這些方法提供各自的表的XML連載和非連載。而且,連載和非連載的支持的結(jié)合允許DataTables作為Web服務(wù)論點而通過。XML.NET Compact 。這些改進不僅簡化運用XML數(shù)據(jù)運作的進程, Compact Framework中可用的資源的協(xié)調(diào)。XPath支持現(xiàn)在,XmlDocument類支持SelectSingleNode和SelectNodes方法——二者都是提供用XPath搜索文檔的能力。XML連載.NET Compact ,譬如XmlElement和XmlAttribute。用XmlSerializer,你可以從XML保存和恢復類,以及保存和恢復類到XML。 Compact 。 Compact ,因此提供改進的Web服務(wù)器訪問性能。XML 圖解現(xiàn)在,.NET Compact 。這些類也可以使用到動態(tài)地產(chǎn)生圖解。數(shù)據(jù)綁定新的數(shù)據(jù)綁定類——BindingSource—— Compact 。 BindingSource通常分在一個或更多數(shù)據(jù)綁定控制和一個數(shù)據(jù)綁定源之間。當使用時,BindingSource類通過提供間接的層數(shù)和增加流動管理、改變事件以及更多來簡化數(shù)據(jù)綁定。通信通信實際上是每個靈活的設(shè)備應(yīng)用程序的一個重要部份。.NET Compact ,同時提供整體的新能力。除新的通信類之外,.NET Compact 。Web服務(wù)就像之前提到的那樣,新的XmlSerializer類通過提供一個更加快速的Web服務(wù)器論點的XML連載和非連載而充分改進了Web業(yè)務(wù)訪問性能。除性能改善之外, Compact 。MSMQ作為想利用MSMQ異步信息特性的應(yīng)用程序開發(fā)商,.NET Compact “”命名域中提供類。這些類為發(fā)送和接收包含使用事物創(chuàng)建基本操作的信息提供支持。連續(xù)端口為了減少當用連續(xù)端口工作時必需的編程的努力,.NET Compact 包含了SerialPort類。SerialPort類提供一個簡化的對連續(xù)通信端口的提取。這個端口提供很多簡化追蹤和配置連續(xù)端口的特性。連續(xù)端口還簡化以連續(xù)端口發(fā)送和接收數(shù)據(jù)——包括自動編碼和解碼數(shù)據(jù)發(fā)送和從端口接收數(shù)據(jù)。IPv6 支持現(xiàn)在,.NET Compact ,還為IPv6提供支持。結(jié)論 Compact 。關(guān)于那些你想要的更多的細節(jié)的那些主題,你可以檢索文獻和MSDN。這篇文章里提到的有關(guān)每個主題的詳細文章在或者很快就會在MSDN上。附錄B 外文原文What39。s New in the .NET Compact Framework IntroductionThe .NETCompactFramework version offers many improvements over its predecessor, the .NETCompactFramework version. Although the improvements are widespread, they all focus on the mon goals of improving developer productivity, providing greater patibility with the full .NETFramework and increasing support for device features. This article provides a highlevel summary of the .NETCompactFramework changes and enhancements.User InterfaceThe relatively small size of smart device displays requires that applications use the available space efficiently, which historically has required that developers spend a great deal of time designing and implementing an application39。s user interface. Recent advances in smart display capabilities, such as highresolution and multiple orientation support have made the job of user interface development even more challenging. To simplify the task of creating application user interfaces, the .NETCompactFramework provides the many new features that are described in this section.Windows Forms ControlsAt the heart of the user interface are the controls。 the .NETCompactFramework provides a number of new controls. These new controls consist of controls that the .NETCompactFramework has in mon with the full .NETFramework in addition to controls that are specific to devices.MonthCalendarThe MonthCalendar control is a customizable calendar control that provides a visual display of dates and is useful for providing a graphical way for users to select dates. DateTimePickerThe DateTimePicker control is a customizable control for displaying and allowing users to enter date and time information. It is especially well suited for smart device applications due to its bination of a pact display and graphical date selection format. When displaying information, the DateTimePicker control renders similar to a text box。 however, when the user is selecting a date, a popup calendar similar to the MonthCalendar control can be displayed. WebBrowser The WebBrowser control encapsulates the de