listbox

C# Excluding related values from a list (LINQ)

Is there an exact opposite action to "join" in linQ to SQL? I want to display just the results that do not fulfill the inner join constraint from a query. I wanna do it just in one query. Here's an example of it's use (http://img165.imageshack.us/img165/4940/liststj3.jpg). ...

WPF - Implementing a listbox that allows the items to be moved up and down.

Hi, This is related to my last post. i want to have up and down buttons on listbox items so that they can moved up/down ie changed its index in the list. Any ideas how I would actualy do this? Malcolm ...

Thread ListBox C# SharpDevelop

Hi everyone. I'm trying to use a Thread in a simple winform. I have a ListBox which I want to fill with numbers at the form's load method. I don't want to wait until it is filled. I'm using something like this: void fillList() { Invoke(new MethodInvoker( delegate { while(true) { i++; ...

Accessing ListBox values at Server after modifying it via Javascript ASP.Net

I have a listBox whose values I am manipulating by javascript for e.g adding a new Item to list. Now when I am trying to access this listBox from Server its only showing me the values that were originally part of ListBox at PageLoad. The newly added items are not accessible. How can I access those new added Items at server ...

WPF M-V-VM: Get selected items from a ListCollectionView?

I've got a WPF app using the Model-View-ViewModel pattern. In my ViewModel I've got a ListCollectionView to keep a list of items. This ListCollectionView is bound to a ListBox in my View. <ListBox Grid.Row="1" ItemsSource="{Binding Useragents}" SelectionMode="Multiple"/> The ListBox has SelectionMode=Multiple, so you can select more...

wpf border control to span the width of listboxItem

Im trying to define a dataTemplate for a business object in my wpf application a collection of which is being bound to a ListBox. <UserControl.Resources> <DataTemplate x:Key="ResizedItemsDataTemplate" DataType="{x:Type resizer:ResizeMonitorItem}"> <Border x:Name="bdr" BorderBrush="Blue" Border...

ASP.NET: How to hide ListBox control vertical scrollbar?

I have tried CSS: overflow: auto. It doesn't work. Any way to achieve it? Do I need to create my custom control as I have seen it on ASP.NET forum? ...

How can I get a vertical scrollbar in my ListBox?

In the example below I have a ListBox with dozens of font names in it. I would have thought it would automatically have a vertical scrollbar on it so that you can select ANY font, not just the first ones in teh list, but it doesn't. So I added a "ScrollViewer" and that puts a "scrollbar area" on the right but there is no scrollbar in t...

C# Can I display images in a list box?

C# In a nut shell can I display images in a list box? I have a list of users and I want to display a green tick next to some of the names, is this possible? PS Winforms program. Thanks ...

C# Which Event should I use to display data in a textbox when I select an item in a listbox?

C# Which Event should I use to display data in a textbox when I select an item in a listbox? I want to select an item in a list box (winforms) and then a textbox near by show some data related to that item but I don't know which event to use. I'll need to be able to click down the list and watch the textbox text update with each click. ...

Why does XAML element-to-xml binding only partially work?

In the below code, the ListBox gets filled with the names of the colors from the XML file, but those names strangely do not appear in the TextBox. However, if you bind the textbox to the static "lbColor2", those names do appear. So what could be different about the names when they come from the XML source which makes them not get passe...

How to make a loading graphic in WPF XAML?

So I have a little WPF XAML that gets the titles of my RSS feed and puts them in a ListBox. However, it takes about 2 seconds to load. How can I have put some kind of AJAXy spinning graphic in the ListBox until the data is there? Here is the code: <Window x:Class="WpfApplication5.Window1" xmlns="http://schemas.microsoft.com/winfx...

Windows forms: how get the actual width of the item in the list box

To make sure that the text in listbox items is not truncated I want to adjust its width to the width of the item with longest text. Is there any way to get a "actual" width of the listbox item the one which is based on the item's text. ListBox.GetItemRectangle does not seem to be returning this actual width. thank you. ...

Autoscrolling a Listbox under a certain situation

How to autoscroll a Listbox after adding a new item, but only if the scrollbar is at the bottom before the item is added? ...

How do I get at the listbox item's "key" in c# winforms app?

I am writing a winforms app in which a user selects an item from a listbox and edits some data that forms part of an associated object. The edits are then applied from the object list to an underlying file. In ASP.Net assigning a different system value to a list item than the display text the user sees is trivial. In a winforms app you ...

How do I set the ZIndex of a Listbox Item on MouseEnter?

I have a different style for the items in my listbox on MouseOver which gives a slight zoom effect. This works nicely, but since the ZIndex is set in the order items are added to the ListBox, the zoomed item will be drawn behind the next item. I would like to set it so that the zoomed item is on top. I've tried creating a MouseOver even...

ItemActivated event in WPF ListBox or ComboBox

Is there an ItemActivated event (like in Windows Forms) in the WPF ListBox or ComboBox controls? I can't see one. It seems crazy for there not to be some event doing the same kind of thing - so does it just go by another name? If not, is there another easy way to do it? I've seen various blog posts about this but they all seem to involv...

Font color of disabled listbox

Hi everybody! I want to draw some listview items disabled and would like to mimic the appearance of a disabled standard Windows listbox. Which colors does it use? I can't find anything in my reference chart :-) or with Google. Edit: Shortly after posting the obvious occurred to me - it seems to be COLOR_GRAYTEXT. ...

C# Force ListBox to update elements

I'm subclassing the standard ListBox control. I get notified of changes to any of the elements added to the list. The task is to update the text shown by the ListBox for the changing element. I'm aware that i could just remove the changed element and add it again, but this seems not preferable for obvious reasons. ...

Silverlight 2 ListBox with a custom panel won't respect size from ArrangeOverride

If I use a custom panel to layout my ListBoxItems, the ListBox won't respect their combined Height (it does respect their combined Width though) - even when my ArrangeOverride returns a size that surrounds all the items. Setting the ListBox's Height explicitly makes everything work, but I want it to work that out for itself! Has anyo...