listbox

Why my WPF binding not work?

I trying to bind List to Listbox. And at the Button1Click method new instance of MyClass adds in my List<>, but that not visible in my listbox. There my code: public static class NotesEngine { public static List<Note> All; static NotesEngine() { All ...

how to display values of multiple properties of an object in a listbox in silverlight using DisplayMemberPath

and i need to do it in code and not Xaml ...

Way to color parts of the Listbox/ListView line in C# WinForms?

Is there a way to color parts of ListBox Items (not only whole line)? For example listbox item consists of 5 words and only one is colored or 3 of 5. Is there a way to do the same with ListView? (I know that ListView can be colored per column but i would like to have multiple colors in one column). I am interested in only free solu...

how can we access the controls in the Itemtemplate Silverlight

i have a list box. i have an item template with a stack panel in it. it has a text box and a check box in the item template. is there a way i can access the check box and enable/disable it on selected index changed? <UserControl.Resources> <DataTemplate x:Key="UserApplicationsTemplate"> <StackPanel Orientation="Hor...

Sliding effect when adding new items to a WPF ListBox

I have a WPF ListBox control which displays items of an RSS feed. I occasionally check the source of the RSS feed for new items. Once I detect a new item I add it to the observable collection which immediately adds the new item to the ListBox display. Is there a way to 'slide in' the new item from the top, pushing down the existing item...

Disabling buttons problem on C#.

Ok so I'm trying to move items from one listbox to another by using multiple buttons i.e I have 2 buttons cmdRight and cmdRight2 which are both disabled on form load If the user selects a single item on the first listbox a cmdRIght button enables but cmdRight2 is still disabled , if the user selects multiple items on the first listbox ...

Winforms: Multiple columns in a listbox

Is there a way to configure a subclassed listbox to arrange items into multiple columns? http://i50.tinypic.com/2n9vozc.png I've considered using a listview, but it seems overkill for what i'm trying to do. Clarification: I want to put multiple items in the same row, rather than giving each item more than one column. ...

WPF: How to select parent listbox if user clicked on child listbox

In my application using DataTemplate mechanism I insert into ListBox item another listbox. But is it possible that when selected one listboxitem in parent listbox, the focus may be on another parent listboxitem's child (see picture) How to do: if one of child listbox in focus (one item from them selected), then parent listboxitem bein...

One word bold inside a text in winform control.

I want some way to make a given word bold(the first two characters of each item in a listbox), and nothing else, something like this: 01 car 02 house 03 market As for these three, being items in a listbox control, ALWAYS the first two characters, the rest should not be bold. Is there any practical way for doing so ? Data: Visua...

wpf edit item in listbox when a button is clicked somwhere on the form

Using this question (Inline editing TextBlock in a ListBox with DataTemplate (WPF) I now have a listbox that can be doubleclicked to edit the items in it. What I want now is to have a button on the form, which when clicked will add a new item to the ListBox (this is easy), but then change the ListBoxItem into editmode, so the user can en...

.NET WinForm ListBox item displays old value untill reassigned to itself

I populate a ListBox control with my own objects redefining ToString(). The objects are displayed correctly when I just add those objects using listBox1.Add(myObject). However, if I later change something in this object, no changes are displayed in the listbox. Debugging reveals that an object inside listBox1.Items is indeed changed, but...

Listbox doesnot display text

In my tabcontrol using WPF,C#.I entering text to listbox in one tabitem from the click event in tabcontrol.But the listbox doesnot display the text.When i debug i can find tht the listbox has count:1 here is the code: namespace Tabcontrol { public partial class PresetTab : UserControl //3rd Tabitem ,preset.xaml.cs { ...

scrollable regions html

What are the options for making scrollable list regions in HTML? So to create listbox-like areas? Is DIV with overflow:scroll the best approach? Or is iframe better? Are there any better newer ways of doing this? Would like to show region of HTML which updates with a list of objects in response to "push" changes from server using AJ...

How to filter a listbox using a combobox

How do I filter items in a listbox using a combobox using c# and windows forms? the listbox contains files and the combobox needs to filter them by their extension Please help I'm new to programming ...

How to control the scroll position of a ListBox in a MVVM WPF app.

I have got a big ListBox with vertical scrolling enabled, my MVVM has New and Edit ICommands. I am adding new item to the end of the collection but I want the scrollbar also to auto position to the End when I call my MVVM-AddCommand. I am also making an item editable(By calling EditCommand with a particular row item) from some other part...

Custom ListBox : Elegant & effective implementation ?

All, I'm currently working on some ListBox customization in order to improve the clearness of my app. Basically, it is quite easy to find 'how to' for this purpose leading to my current result below. I'm happy with the display but ... I faced strange behavior with the mousewheel. I tried to find information on this issue and I found...

Week Days list box in Jquery

I am looking for a JQUERY list box (or select box) with value as MON,TUE,WED,THUR,FRI,SAT,SUN and text as Monday,Tuesday,Wednesday,Friday,Saturday,Sunday. The text will be displayed to the user. If the user selects Friday from the list box the corresponding value FRI is passed to the server. While loading the list box if the value from t...

saving the contents of a listbox to a text file c#

How can I save the contents of my listbox to a text file using a save file dialog? I also want to add additional information to the text file and also add a message box saying saved when it's been successful. Thankyou in advance for any help ...

Add value in listbox from list of values without using for loop

I have used a ListBox in my Windows application. I got the variable iplist from a WCF server. After that i addded that list in my ListBox, but it generated an error: "Collections modified, enumuration may not execute". How might I solve this problem? My code is: foreach (ClsPC pc in iclsobj.GetPC()) { if (listBox1.Items.Count == ...

WPF data bound ListView/ListVBox won't select if list only has one item

So this is pretty mystifying. I have a databound ListBox (or ListView, it happens with both), and if it has more than 2 items in it, selection works - I get a blue highlight bar and the item looks selected. If I only have 1 item, the selection does not work - I do not get a blue highlight bar, but the selection events all fire as normal....