当前位置: 首页>>代码示例>>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;未经允许,请勿转载。