listbox

want to create a listbox with a textblock and a button itemtemplate

I want to create a listbox like the one shown in the image, i just dont know how will i get the button(the red close button) click event for each item in the listbox Can anyone point me to a good tutorial on this Thanks ...

WPF Accessing Items inside Listbox which has a UserControl as ItemTemplate

I have Window that has a ListBox ListBox(MyListBox) has a DataTable for its DataContext ListBox's ItemSource is : {Binding} Listbox has a UserControl(MyUserControl) as DataTemplate UserControl has RadioButtons and TextBoxes (At first They're filled with values from DataTable and then user can change them) Window has one Submit Button ...

VB.Net: Resizing ListBoxView Column When Form Resizes

How can I have a single column resize with the form so that the ListView columns continue to fill the whole form? ...

How to add list box in action script 3

I want to add simple list/combo box with action script 3 . but i have not found anything in internet. Can anyone give me sough rough idea with some dummy values thanks ...

How to make Listbox's texts center aligned in desktop application using c#.net

Please tell me how can i align center to my listbox's text in desktop application. i am using c#.net in visual studio 2005 I am using window forms.. ...

VB.net Color one part of text -- Listbox

In VB.net is there anyway to make a certain part of the string to have a different color to make it stand out? This doesn't work but if I could something like this string = ("How".ForeColor(red) & "are".FontColor(green)) Would it be possible to make anything similar to this in a ListBox? If this is not possible is there a way to hav...

Listbox with checkboxes and single check in Silverlight

Hello, everyone. I need a ListBox which will contain several options. I need checkboxes exactly(style), not radio buttons. Is there any way i can allow only 1 checked checkbox at the moment? I'm using MVVM, so i can't just check or uncheck them manually, it's against the rules. And if i can't make such functionality - is there easy way t...

Can you set a gradient brush for a listboxitem background in silverlight?

I am looking for a way to set a gradientbrush as the background for a listbox item. I have a DataTemplate defined and have specified a gradient brush but it always appears as the listbox background (i.e. it never shows as a gradient brush). I have been able to set the background of the listbox itself, and I can set the listboxitem's ...

Need help in listbox multiple select

I have a list box, filled with countries. A user can select multiple countries in the list box. <asp:ListBox ID="lstRegion" style="width: 115px;size:3px" runat="server" onselectedindexchanged="lstRegion_SelectedIndexChanged" SelectionMode="Multiple" > <asp:ListItem Text="Please Select" Value="" Selected="True"></asp:ListItem> </asp:...

Loop doesn't update listboxes until it is done iterating

I have a loop that takes file name from a listbox, performs a system() call, then moves that filename to another listbox. Problem is, it doesn't move the filenames over one at a time, but waits until the entire loop is finished and moves them all at once. What would I do to get it to perform how I want it to? the loop: for each( String...

Getting Selected Items From WinForm ListBox?

I have a ListBox in a WinForm with multiselect enabled. The selected items appear to be stored in an object, how to I get their values? ...

WPF: Populate a listbox on window load

How can it be done with c#? I'm able to populate a listbox on a button click, but don't know how it can be done on application startup. Thanks. ...

ListBox and Datasource - prevent first item from being selected

Hey. I've got the following code that populates my list box UsersListBox.DataSource = GrpList; However, after the box is populated, the first item in the list is selected by default and the "selected index changed" event fires. How do I prevent the item from being selected right after the list box was populated, or how do I prevent th...

How to stop automatic refresh of a WPF ListBox Databinded on a EntityFramework object

Hi, I have a Xaml Page with a Databinded ListBox and a detail grid to create or update selected element. My Page.DataContext is binded on a ADO.NET Entity Data Model table ("Univers"). private void Page_Loaded(object sender, RoutedEventArgs e) { SEPDC = new Models.SEP(); universViewSource = new CollectionViewS...

How can make ScrollViewer scroll when mouse is over *any* content

The reason I stress 'any' is because CanContentScroll is not fully working in my ScollViewer. Let me explain the scenario: I have a ScrollViewer that has three Labels followed by a ListBox each. The reason I have this content inside the ScrollViewer is because I don't want each ListBox to have a ScrollBar, I just want one "global" Scroll...

Highlight the first row in a ListView and a ListBox Control

I am attempting to show both a ListView and ListBox on a Windows Form (C#). The difficulty I am having is in having the first row for both the ListView and ListBox highlighted when the application opens. Could someone please steer me in the right direction so that the first row of both the ListView and ListBox are highlighted when the ...

WPF: Update Listbox automatically C#

Hi, I have two WPF windows developed using the surface SDK, one that is a data entry form, and the second dispays the data in a listbox. The listbox displays the data perfectly but when I add a new record using the data entry form, the listbox is not updated until I reopen the window. Is there a way to automatically update the listbox t...

Configure ListBox in WPF so that I will be possible to select multiple items without holding CTRL key

I have a Listbox that allows user to select multiple items. Normally user can do that by holding CTRL key and clicking the item he or she wants to select. Is it possible to configure this listbox so that the user will not have to hold the CTRL key when selecting items ? So that he or she will just click the item (without holding anythin...

Ignore errors when scanning for files in C:\

I am trying to search the C:\ drive for all files with a certain extension. I am using the following code which is working fine, however when it encounters an error the whole process stops rather than continuing with the scan. (running in backgroundworker, hence the invoke) Private Sub ScanFiles(ByVal rootFolder As String, ByVal fileExt...

Databound Listbox in Wizard loses selections on page change

I downloaded the source code from this tutorial after a failed attempt to make my own Wizard. The control works great and is integrating nicely into my program. I have one minor problem, though. I have a page that has both a databound ListBox and a databound TreeView. When changing to the next or previous page, the TreeView maintains its...