listbox

Problem selecting listboxitems with mouse when stackpanel is Orientation=Horizontal

In the listbox below, when I mouse over the item labeled "This does not work", I need to actually select the textblock in order to get the listboxitem to select. In the one labeled "This works" the only difference is that the Orientation is not set to horizontal. In the one that works, I can select all the way to the right of the textblo...

html listbox to show additonal txt in extra field outside of listbox

Hello everyone, I have the following db-retrieve which results in the Listbox I like to have. But I need $desc2 to be shown under the listbox in a separate field and it must change its content when the user clicks on an other item in the list: Here is the retrieve which works: echo "<form action=\"admin.php\" method=\"post\">"; echo ...

WPF ListBox Show WAIT Cursor ?

I have a WPF ListBox that displays images loaded from a local folder, usually somewhere between 1- 300). I'm using a converter in my imageTemplate to make sure and show thumbnails of the images, and not the images in their full size. Even while doing this, it still can take several seconds to load initially. My question is, how do I know...

Custom ListView binding it to a object list [winforms]

EDIT: Question Reworded I have a listbox that should display data that contains 2 fields: time and a message. Instead of displaying 1 line of text, I want each item to be displayed as 2 lines - 1st line is the time and the 2nd line is the message, where each line has a different style. How can I do this? I can bind the object array to ...

Winform customize listbox item

Possible Duplicate: Custom ListView binding it to a object list I have a listbox that should display data that contains 2 fields: time and a message. Instead of displaying 1 line of text, I want each item to be displayed as 2 lines - 1st line is the time and the 2nd line is the message, where each line has a different style. Ho...

Replaced ItemsControl with ListBox and the item selection + ListBox height seems broken...

Hello, I have loaded this project into Visual Studio => http://sites.google.com/site/huyphamproject/Home/MyDashBoard.zip I have replaced all ItemsControl declaration in the main xaml file with ListBox so I have a SelectedItem property which I would need to use it with mvvm + datatemplate. When I select now one item in the ListBox-dash...

Drag and drop between ListBox items and Grid cells in WPF?

Hi There is a list box with some items in it. Also there is a grid with 3x3 matrix. The user will be dragging an item and dropping on one the cells of grid. Most of the samples I found are about dragging-dropping from one listbox to another listbox. But I want to drop in one cell of grid. How can I achieve this? Please advise. thanks P...

image and text in listobx

I want to inesrt one image beside one text,like this i have to include three items in listbox. in run time. If the number of items is more than 3,then the last items get removed. How can i do that in WPF,C#. And the newly added item should get added in first place. Now i did up to include text at runtime. if (listBox1.Items.Count >= 3) ...

ListBox MouseBinding to Command not working

Hi ! I want to bind the MouseDoubleClick (or PreviewMouseDoubleClick) to my custom Command defined in my custom WPF Control. The problem is that it does not work. ... <Popup> ... <!--This CommandBinding **DOES NOT WORK** !--> <ListBox Grid.Row="1" x:Name="PART_lBox" ...

ListBox selected index color wpf

I am just starting with WPF and I have this ListBox that displays an attribute from a class I made. I have to programmatically change the selected index, when I do something like: ListBox1.SelectedIndex = 4; the selected index is changed and highlighted gray, but if I click on it, the selected index is blue. Is there something els...

How to Set Width for Columns in LISTBOX ??

I have a Listbox in to which I am binding the data coming from a DataTable I am using VisualStudio 2003, .net 1.1 For Each dr As DataRow In dt.Rows Dim li As New ListItem(dr("BIPAD").ToString().PadRight(25, Microsoft.VisualBasic.ChrW((160))) + dr("TITLENAME").ToString()) lbMagTilteByCategory.Items.Add(li) ...

Determining which object was selected using a listbox

Hi, i have a array of objects, for example people and info about them. how could i determine who was selected in the listbox where only their first and last name is shown? Is it even possible somehow to link a item in the listbox with a item in the array? Obviously i can't rely on SelectedIndex because when the names in the listbox get ...

Vb.net - Select listbox item based on string

Hi, I'm trying to write a small app which can be used in order to log off Citrix Sessions. Citrix Sessions can be logged off via cmd or a batch file using this method: @echo off echo "Enter username" set /p UserName= echo 001 query user %username% /server:server1 echo 002 query user %username% /server:server2 echo 003 query user %user...

C# DataBinded ListBoxes - Sorting Issue

I have these ListBox es.. all of them are DataBind ed to same table and they are in a table type of manner, every row corresponds to its actual value in the datbase. When i switch selection(SelectedIndexChange) on any of these ListBoxes i change the SelectedIndex of all the other ListBox es. Now i cannot simply select "Sort = true" f...

How to create a multicolumn Listbox?

Hi! I'm working on a program, which should list all files and it's size(for now...). I created a simple application, which should write the data to a listbox. I'm trying to write the data in two columns(the first should be the name, and next to it, in an other column, it's size), but i can't figure out, how should i do this. Can someone...

How can I detect which listbox item another item was dropped onto?

I have two listboxes. The listbox1 contains a list of the DB names. Listbox2, on the other hand, has a list the titles of the content associated by the DB on listbox1. Basically you click on listbox1 and it loads into listbox2 all the titles for the content of the DB. I want to implement now a drag and drop feature. I know how to drag b...

Silverlight relativebinding ItemTemplate ListboxItem - Listbox

I created programatically a class (I called it ViewGrid) so that I use an instance of it as ItemTemplate for my ListBox control; of course, it's my data template for the listboxitem.... Also, in my ViewGrid class, I got a dependency property called IsChecked and I want to keep it in sync with the ListBoxItem's IsSelected property. I not...

disable mouse wheel on itemscontrol in wpf

I have a usercontrol that has a scrollviewer, then a bunch of child controls like text boxes, radio buttons, and listboxes, etc inside of it. I can use the mouse wheel to scroll the parent scrollviewer until my mouse lands inside a listbox then, the mouse wheel events start going to the listbox. is there any way to have the listbox sen...

How to style the selected item of a ListBox to look like a selected item of a ListView (with GridView)?

I'd like to have the selected item of a ListBox on the right to look like the selected item of a ListView (with GridView) on the left. This is the XAML code: <Grid> <StackPanel Orientation="Horizontal" > <ListView Margin="4" Width="200" > <ListView.View> <GridView> <Grid...

WPF Databound RadioButton ListBox

I am having problems getting a databound radiobutton listbox in WPF to respond to user input and reflect changes to the data it's bound to (i.e., to making changes in the code). The user input side works fine (i.e., I can select a radiobutton and the list behaves as expected). But every attempt to change the selection in code fails. Sile...