本文整理汇总了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;
}
示例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;
}
示例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();
}
示例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")));
}
示例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")));
}
示例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")));
}
示例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")));
}
示例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")));
}
示例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")));
}
示例10: ThingPage
public ThingPage()
{
InitializeComponent();
// Fields.
_CommandTargetListPicker = (ListPicker)this.FindName("CommandTargetListPicker");
// Event handlers.
ViewModel.CommandTargetRequested += new EventHandler<ThingViewModel.CommandTargetRequestedEventArgs>(ViewModel_CommandTargetRequested);
}
示例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")));
}
示例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")));
}
示例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;
}
示例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")));
}
示例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")));
}