listbox

How to disable Virtualizing for lisbox item Wp8

為{幸葍}努か 提交于 2019-12-06 15:20:05
I am not able to disable the Virtualizing property under VirtualizingStackPanel for listbox .I am only getting VirtualizationMode property. Actually i need to get checkbox element under listbox.Tried several methods but most appropriate ans i got here but i was getting ItemContainerGenerator as null. After more rnd i found that i need to set IsVirtualizing=false to get the ItemContainerGenerator . xaml is :: <ListBox x:Name="my_list" Grid.Row="0"> <ItemsControl.ItemTemplate > <DataTemplate > <StackPanel Orientation="Horizontal" > <CheckBox x:Name="cbx_state" Tag="{Binding}"/> <TextBlock x:Name

Change style for all ListBoxItem in a ListBox (Windows phone 8)

删除回忆录丶 提交于 2019-12-06 15:12:31
I have a Listbox with some Listboxitem and I would like to change the style of all items. I know, it's possible to create a style in resources and bind this style to each item but maybe is there a possibility to do it so easier (without binding)? With ListBox.ItemTemplate? <ListBox SelectionChanged="ListBox_SelectionChanged"> <ListBoxItem x:Name="ItemAdress"> .... </ListBoxItem> <ListBoxItem x:Name="ItemPhone"> .... </ListBoxItem> <ListBoxItem x:Name="ItemEmail"> .... </ListBoxItem> </Listbox> In fact, my objective is to add Margin bottom 15 for each item. (add a space between items) Note:

Tlistbox items from database column

南笙酒味 提交于 2019-12-06 15:01:40
Is there a way to populate a TListbox control with items from a database column? I know the proper way to do this is to simply use a DBLookupListbox control and set it up to access the column I want, but the problem with that is when I click on one of the items in the lookup control, it changes the current row in the dataset (expected behavior) but I do not want this to happen. Instead, I would want the current row to be changed only on a double click event in the lookup control and since I do not think this behavior is possible to change, I thought it would be easier to simply use a normal

bind listbox to index C#

馋奶兔 提交于 2019-12-06 14:45:51
I dont know if it possible but what I want is something like that In WinForm listbox1 has a list of lines(copied from file) In another Thread and class I run on a List that contains the same lines each line I parse and DoSomething once I finish with that line I want the index in the listbox to change from my basic and limited understanding my approach was with an Event to fire in form and than maybe using Invoke (for not to cross thread ) Is there is a way to somehow bind to index of the listbox somehow with my for/foreach loop ? class form { listBoxScript.SetSelected(ScriptCounter, true);<-

WPF - bind a listbox to a list<string> - what am I doing wrong?

大憨熊 提交于 2019-12-06 14:19:15
I'm trying to do something very basic here, something I wouldn't have expected to give me this many problems. I have a public property on my main Window class called ItemList which is of type List<string> . I add to this list throughout the life of the program, and would like the ListBox control I have on my form to automatically update when I add new items to the ItemList property. So far, I have the following XAML: <Window x:Class="ElserBackupGUI.Main" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Backup

Unfocused ListBox, item style

扶醉桌前 提交于 2019-12-06 13:57:35
OK, I can't believe there is no online resources about this. I want to do a simple thing and change style of a ListBox item when it's selected and it's parent ListBox has lost focus. We have been using VisualStateManager for this purpose, but since there is overlapping in Selected , SelectedFocused and Focused states, there were some bugs introduced when selecting items holding ctrl for example(wrong items appear selected). I decided to fix it using Trigger s and found out that there seems to be no way of triggering when ListBox lost focus. My question is what is the right way of implementing

listbox with checkboxes

人走茶凉 提交于 2019-12-06 13:37:32
问题 Greetings, in my asp.net mvc application I have a listbox rendered as follows: <%= Html.ListBox("localization", (Model as SeekWeb.Models.CreateMessageViewModel).Localizations.AsEnumerable())%> is there any way to have checkbox for each listbox item? if checkbox is checked then the appropriate listbox item is selected. 回答1: I use a funky little jQuery plugin - jQuery Multiselect - to turn listboxes into more user friendly checkboxes. It's themeroller ready too! Yeah, it does rely on the user

How do I show the filename in listbox but keep the relative path using openfiledialog?

拟墨画扇 提交于 2019-12-06 13:00:46
问题 I am making a program in which the user needs to load in multiple files. However, in the ListBox I need to show only file names of the files they loaded but still be able to use the files loaded. So I want to hide the full path. This is how I load a file into the ListBox now, but it shows the whole path: private void browseBttn_Click(object sender, EventArgs e) { OpenFileDialog OpenFileDialog1 = new OpenFileDialog(); OpenFileDialog1.Multiselect = true; OpenFileDialog1.Filter = "DLL Files|*

Filter ListBox items based upon textbox from OnKeyUp?

谁说我不能喝 提交于 2019-12-06 12:45:30
I have a ListBox containing a large number of items, which are all account numbers and so hard to search through. Is it possible to have the items "filtered" as the user types into a textbox, so that only items that match what has been entered so far are displayed? e.g. List Box 2342 3434 2332 3224 User then enters 3 in the texbox - onKeyUp the listbox is filtered to only display: TextBox 3 ListBox 3434 3224 User then enters a 2 in the box: Textbox 32 ListBox 3224 Is this possible in ASP.Net (not MVC2)? If so, is it best via callback in an UpdatePanel or javascript of somekind? Here is a

Binding to nested property only showing first item in list

蹲街弑〆低调 提交于 2019-12-06 12:10:34
I am trying to bind a ListBox Control in C# Winforms in .NET 4.5 to a list of objects that have a nested property that I wish to use for a DisplayMember. It sort of works except that when I set the DisplayMember to the nested property the listbox only shows one item even though there are two items in the list that it is bound to. If I comment out the code for setting the DisplayMember the listBox shows two items. Is this a bug in the framework? I would like to avoid adding another property or overriding ToString() if I can since I am implementing MVP and would like to keep my view logic