當前位置: 首頁>>代碼示例>>C#>>正文


C# Controls.ListPicker類代碼示例

本文整理匯總了C#中Microsoft.Phone.Controls.ListPicker的典型用法代碼示例。如果您正苦於以下問題:C# ListPicker類的具體用法?C# ListPicker怎麽用?C# ListPicker使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ListPicker類屬於Microsoft.Phone.Controls命名空間,在下文中一共展示了ListPicker類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: BuildListPicker

 /// <summary>
 /// 將ListPicker控件綁定到收支分類
 /// </summary>
 /// <param name="listPicker">需要綁定的ListPicker控件</param>
 /// <param name="type">收支類別</param>
 public static void BuildListPicker(ListPicker listPicker,int type)
 {
     listPicker.ItemsSource = from c in App.categoryHelper.data
                              where c.Type == type
                              select c.Name into c
                              select c;
 }
開發者ID:TomHGTang,項目名稱:AccountBook,代碼行數:12,代碼來源:Common.cs

示例2: ConvertSelectFields

        public List<ListPicker> ConvertSelectFields(HtmlAgilityPack.HtmlNodeCollection nodes)
        {
            if (nodes == null)
                return null;
            var ret = new List<ListPicker>();
            foreach (var item in nodes)
            {
                ListPicker foo = new ListPicker();
                foo.Name = item.Attributes["Name"].Value;
                foo.HorizontalAlignment = HorizontalAlignment.Stretch;
                var options = item.SelectNodes(".//option");
                var listboxitems = new List<KeyValuePair<string, string>>();
                foreach (var option in options)
                {
                    var bar = new KeyValuePair<string, string>(HttpUtility.HtmlDecode(option.NextSibling.OuterHtml), option.Attributes["value"].Value);
                    listboxitems.Add(bar);
                }
                foo.ItemsSource = listboxitems;
                foo.FullModeItemTemplate = (DataTemplate)Application.Current.Resources["SearchListBoxItemTemplate"];
                foo.ItemTemplate = (DataTemplate)Application.Current.Resources["SearchListBoxItemTemplateSelected"];
                foo.BorderThickness = new Thickness(2.0);
                foo.SelectedIndex = 0;
                ret.Add(foo);

            }
            return ret;
        }
開發者ID:rkrishnasanka,項目名稱:Dubizzle,代碼行數:27,代碼來源:HTMLtoXAML.cs

示例3: AdvancedMessageBox_Click

        private void AdvancedMessageBox_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton hyperlinkButton = new HyperlinkButton()
            {
                Content = "Más información.",
                HorizontalAlignment = HorizontalAlignment.Left,
                NavigateUri = new Uri("http://javiersuarezruiz.wordpress.com/", UriKind.Absolute)
            };

            TiltEffect.SetIsTiltEnabled(hyperlinkButton, true);

            ListPicker listPicker = new ListPicker()
            {
                Header = "Recordar en:",
                ItemsSource = new string[] { "5 minutos", "10 minutos", "15 minutos" }
            };

            StackPanel stackPanel = new StackPanel();
            stackPanel.Children.Add(hyperlinkButton);
            stackPanel.Children.Add(listPicker);

            CustomMessageBox messageBox = new CustomMessageBox()
            {
                Title = "Recordatorio",
                Caption = "Programar Windows Phone",
                Message = "Realizar ejemplo del control CustomMessageBox",
                Content = stackPanel,
                LeftButtonContent = "Aceptar",
                RightButtonContent = "Cancelar",
                IsFullScreen = (bool)FullScreenCheckBox.IsChecked
            };

            messageBox.Dismissing += (s1, e1) =>
            {
                if (listPicker.ListPickerMode == ListPickerMode.Expanded)
                {
                    e1.Cancel = true;
                }
            };

            messageBox.Dismissed += (s2, e2) =>
            {
                switch (e2.Result)
                {
                    case CustomMessageBoxResult.LeftButton:
                        // Acción.
                        break;
                    case CustomMessageBoxResult.RightButton:
                    case CustomMessageBoxResult.None:
                        // Acción.
                        break;
                    default:
                        break;
                }
            };

            messageBox.Show();
        }
開發者ID:rwecho,項目名稱:Windows-Phone-Samples,代碼行數:58,代碼來源:MainPage.xaml.cs

示例4: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/NotEdible;component/SettingsPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.InterfaceLanguage = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("InterfaceLanguage")));
 }
開發者ID:jeremejevs,項目名稱:milk-manager,代碼行數:9,代碼來源:SettingsPage.g.i.cs

示例5: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Success;component/List.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Summ = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("Summ")));
 }
開發者ID:sunrizzi,項目名稱:success,代碼行數:9,代碼來源:List.g.cs

示例6: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/CustomToolkit;component/PhoneToolkitSample/Samples/ListPickerSample.xaml", System.UriKind.Relative));
     this.PrintInColors = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("PrintInColors")));
     this.RegionList = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("RegionList")));
 }
開發者ID:fstn,項目名稱:WindowsPhoneApps,代碼行數:9,代碼來源:ListPickerSample.g.cs

示例7: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneToolkitSample;component/Samples/TransitionsSample.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.Family = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("Family")));
     this.Mode = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("Mode")));
 }
開發者ID:jeremejevs,項目名稱:milk-manager,代碼行數:10,代碼來源:TransitionsSample.g.i.cs

示例8: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/My_Note;component/Setting/ThemeChange.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.SelectThemeList = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("SelectThemeList")));
 }
開發者ID:virtualcca,項目名稱:My_Note,代碼行數:10,代碼來源:ThemeChange.g.i-Myluobin-Rabook.cs

示例9: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GiveMeSomething;component/Settings.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.RatingControl = ((Microsoft.Phone.Controls.Rating)(this.FindName("RatingControl")));
     this.ListOfCounts = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("ListOfCounts")));
 }
開發者ID:fstn,項目名稱:WindowsPhoneApps,代碼行數:10,代碼來源:Settings.g.i.cs

示例10: ThingPage

		public ThingPage()
		{
			InitializeComponent();

			// Fields.
			_CommandTargetListPicker = (ListPicker)this.FindName("CommandTargetListPicker");

			// Event handlers.
			ViewModel.CommandTargetRequested += new EventHandler<ThingViewModel.CommandTargetRequestedEventArgs>(ViewModel_CommandTargetRequested);
		}
開發者ID:chier01,項目名稱:WF.Player.WinPhone,代碼行數:10,代碼來源:ThingPage.xaml.cs

示例11: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/My_Note;component/Setting.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ShowFontSize = ((System.Windows.Controls.TextBlock)(this.FindName("ShowFontSize")));
     this.TextFontSizeSlider = ((System.Windows.Controls.Slider)(this.FindName("TextFontSizeSlider")));
     this.FontFamilyListBox = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("FontFamilyListBox")));
 }
開發者ID:virtualcca,項目名稱:My_Note,代碼行數:11,代碼來源:Setting.g.i.cs

示例12: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Chicago%20Code%20Camp;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.progMain = ((System.Windows.Controls.ProgressBar)(this.FindName("progMain")));
     this.lpEvents = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("lpEvents")));
     this.MainListBox = ((System.Windows.Controls.ListBox)(this.FindName("MainListBox")));
 }
開發者ID:paaschpa,項目名稱:ChicagoCodeCamp,代碼行數:11,代碼來源:MainPage.g.cs

示例13: CreateThemeColorListPicker

 private ListPicker CreateThemeColorListPicker()
 {
     ListPicker p = new ListPicker();
     p.Header = "Select document editor background color";
     p.Margin = new Thickness(12, 35, 12, 30);
     p.Items.Add(ThemeColor.dark);
     p.Items.Add(ThemeColor.light);
     p.Items.Add(ThemeColor.phone);
     p.SetBinding(ListPicker.SelectedItemProperty, GetBinding("NoteEditorThemeColor"));
     return p;
 }
開發者ID:ireynolds,項目名稱:Document-Store,代碼行數:11,代碼來源:Settings.xaml.cs

示例14: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/StarckBuks;component/Buscar.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.listaNombresVista = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("listaNombresVista")));
     this.listaLugarVista = ((Microsoft.Phone.Controls.AutoCompleteBox)(this.FindName("listaLugarVista")));
 }
開發者ID:jacevedo,項目名稱:Windows-Phone,代碼行數:11,代碼來源:Buscar.g.cs

示例15: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PsychicTest;component/View/Settings.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.StackPanel)(this.FindName("ContentPanel")));
     this.SoundSwitch = ((Microsoft.Phone.Controls.ToggleSwitch)(this.FindName("SoundSwitch")));
     this.LspNumberGuesses = ((Microsoft.Phone.Controls.ListPicker)(this.FindName("LspNumberGuesses")));
     this.PickerFullModeItemTemplate = ((System.Windows.DataTemplate)(this.FindName("PickerFullModeItemTemplate")));
 }
開發者ID:kiendev,項目名稱:PsychicTest,代碼行數:12,代碼來源:Settings.g.i.cs


注:本文中的Microsoft.Phone.Controls.ListPicker類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。