(For this example) ListBox l is bound to CustomObjectCollection c.
Does l call c's Constructor?
What if c is a Generic Object?
**In XAML (1)**
<ListBox Content={Binding CustomObjectCollection}/>
**In Codebehind**
CustomObjectCollection<MyClass> c;
**In XAML (2)**
<ListBox Content={Binding CustomObjectCollection}/>
Suppose in c, I po...
I'm writing some code and I need to get the window handle of the listbox associated with a combo box. When looking in spy++, it looks like the parent of the listbox is the desktop, not the combo box. How can I programmatically find the listbox window handle?
...
I have a simple usercontrol that uses a simple custom panel where I just overrode the Orientation and Measure functions.
What I want to do is to have a property in the usercontol to control the orientation
So I basicaly have
UserControl
--> Listbox
--> MyPanel
And I want a property for the usercontrol that can be set in xaml (of...
I'm iterating through the controls in a dialog and I'm trying to determine if a combobox was created with the WS_VSCROLL style.
The style, obtained from GetWindowLong(hwnd, GWL_STYLE), doesn't contain the WS_VSCROLL bit (0x200000), even when I know it was set on create.
Clarification: I am looking to see if the ComboBox was created ...
Hi there.
I'm trying to override the default ListBox colour properties when an item is highlighted. However, this XAML code simply causes the text of the highlighted item to disappear completely (or become transparent).
<SolidColorBrush Color="{Binding Path=Foreground, ElementName=UserControl}" x:Key="{x:Static SystemColors.ControlText...
The tricky part is that each item has a ContextMenu that I still want to open when it is right-clicked (I just don't want it selecting it).
In fact, if it makes things any easier, I don't want any automatic selection at all, so if there's some way I can disable it entirely that would be just fine.
I'm thinking of just switching to an I...
I need to sort the data contained within a number of listboxes. The user will be able to select between two different types of sorting using radio boxes, one of which is checked by default on form load. I have created the IF statements needed in order to test whether the checked condition is true for that radio button. but i need some he...
I have a style defined for my ListBoxItems with a trigger to set a background color when IsSelected is True:
<Style x:Key="StepItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Template"...
Is a List enumerable?
Html.List("mylistbox", Model.UserList);
doesnt' seem to be working, where UserList is a List collection.
...
I want to create a list of logically related RadioButtons. The RadioButtons are bound for MVVM use. There's ToolTips on each RadioButtons.
...
I have two list boxes like show below, side by side.
They both have anchors on top, bottom, left and right.
When I stretch the window the left listbox grows over the right one. While I want the margin between them to stay and for both listboxes to expand evenly. Is there anyway to achieve this?
Thanks!
...
How to add the listbox items using UiBinder?
...
I'm working on a complex application, and I'm having an issue with a listbox not being bounded by the window height. Here's a simplified version of what it looks like. How would I get this listbox to correctly be bounded by the window? Right now, the bottom scroll button is off the screen and cannot be seen until the window is big enough...
I have a listbox bound to a list of objects for a data entry screen. The item template includes textblocks, a checkbox and comboboxes.
When the listbox is populated I would like to change the foreground color of the textblocks to red if object.value1 = true and object.value2 = 0.
Any ideas?
...
In Silverlight, I have a Grid with DataContext set to class ViewModel.
The ViewModel contains list of items (each of them containing int ID and string Text) and an integer "ID", which identifies the currently active item (not selected item).
I would like to construct xaml with ListBox where activated item has another color. How can I do ...
Hey,
I have a ListBox with a number of ListBoxItem objects. What is the best way to allow users to rearrange the items by dragging and dropping? Do I have to use StackPanels instead?
Thanks for any suggestions
...
I am using visual studio 2008 with vb as my language. I have a databound multiextended listbox. I need to get the selected value for each item that is selected. I have searched for two weeks trying to find and answer. Can anyone help? I would greatly appreciate it.
...
I have a ListBox that is bound to a list of CustomerViewModel-objects, that each has two dependency properties:
- Name (string)
- Description (string)
- IsVisible (bool)
(the IsVisible property is True by default and is reversed via the ToggleVisibility Command on the CustomerViewModel)
I would like to display the Name and Descriptio...
I'm overriding the styles of my ListBoxItems with a ControlTemplate, however by doing that, I lost the handler for my ListBoxItem click event. I found a post that was helpful in saying I need to add an event handler in the ControlTemplate, but I don't know how to do this.
Any help & direction on doing this is greatly appreciated!
...
How can you make the content of a ListBoxItem copyable? not editable.
...