與眾不同windows phone (34) 8.0 新的控制項: LongListSelector

來源:互聯網
上載者:User

介紹

與眾不同 windows phone 8.0 之 新的控制項

新的控制項 - LongListSelector

示 例

示範 LongListSelector 控制項的應用

1、提供資料

Controls/CityInfo.txt

101330101=澳門=aomen101080904=阿巴嘎=abagaqi101271901=阿壩=aba101050104=阿城=acheng101081102=阿爾山=aershan101131504=阿合奇=aheqi101130801=阿克蘇=akesu101131503=阿克陶=aketao101130701=阿拉爾=alaer101131606=阿拉山口=alashankou101081202=阿右旗=alashanyouqi101081201=阿左旗=alashanzuoqi101131401=阿勒泰=aletai101140701=阿里=ali101080603=阿魯旗=aluqi101081003=阿榮旗=arongqi101131501=阿圖什=atushi101130809=阿瓦提=awati101050503=安達=anda101160208=安定=anding101140605=安多=anduo101240612=安福=anfu101090220=安國=anguo101250704=安化=anhua101210203=安吉=anji101110701=安康=ankang

Controls/CityInfo.cs

namespace Demo.Controls{    /// <summary>    /// city 資訊實體類    /// </summary>    public class CityInfo    {        /// <summary>        /// city 標識        /// </summary>        public string CityId { get; set; }        /// <summary>        /// city 名稱        /// </summary>        public string Name { get; set; }        /// <summary>        /// city 拼音        /// </summary>        public string Pinyin { get; set; }             /// <summary>        /// 擷取城市的拼音首字母        /// </summary>        public static string GetFirstPinyinKey(CityInfo cityInfo)        {            char indexLetter = char.ToUpper(cityInfo.Pinyin[0]);                 if (indexLetter < 'A' || indexLetter > 'Z')            {                indexLetter = '#';            }                 return indexLetter.ToString();        }    }}

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.