How to bind non-existing IsEmpty property of listbox?
Hello, I have a form and a button should be enabled only if the listbox is not empty. How can I do binding for this case? Note: I would like to avoid creating custom converter. Thanks! ...
Hello, I have a form and a button should be enabled only if the listbox is not empty. How can I do binding for this case? Note: I would like to avoid creating custom converter. Thanks! ...
Hi, I have a ControlTemplate for my ListBoxItems and i want to animate between 4 different colors for the 4 Possible states of the Properties IsSelected and IsMouseOver. I have tried this using a MultiTrigger like this (IconBorder is a border surrounding the ListBoxItems <MultiTrigger> ...
Private Function ColumnEqual(ByVal A As Object, ByVal B As Object) As Boolean If A Is DBNull.Value And B Is DBNull.Value Then Return True End If If A Is DBNull.Value Or B Is DBNull.Value Then Return False End If Return A = B End Function ..... Public ...
Using Excel 2007 VBA Have a sheet "Dashboard", have other sheets but some special task sheets that can be anywhere in the book, but will always be found between Sheets "TaskNew" and "TaskEnd". These special task sheets will vary in count. Upon dashboard activation, want to populate the listbox with the names of all special task sheets,...
I'm writing some VBA and would love to use Listbox.BeginUpdate and ListBox.EndUpdate to speed up the loading of userforms however VBA doesn't seem to support these, only vb. Anyone got any handy suggestions? ...
Hi, I am trying to bind a dictionary's key to a row of the grid in a listbox, and bind the dictionary's value to another row of the grid. key's type is Book, a class thati wrote and the value's type is int. i want to write the elements of the class and the integer value in grid. Can you help me on this? I'm quite confused on determining...
When Setting the listbox selectionmode to multiextended I observed three ways to select items: pressing mouse key while holding shift key pressing mouse key while holding ctrl key pressing mouse key while moving mouse over unselected item 1 and 2. is exactly the behaviour I want but I dont' want 3. because later I want to rearrange i...
I am using WPF and C# I have a button that opens a window, which also includes a button that adds an User object item to a listbox and I want the listbox index to be updated after insertion. I understood that the solution is about using observable class of INotifyCollectionChanged but actually I dont know how and where to use them. Can y...
I want to disable the possibility to navigate a ListBox with the keyboard. My first thought was to set up a PreviewKeyDown handler like so: private void ListBox_PreviewKeyDown(object sender, KeyEventArgs e) { e.Handled = // some logic here ... } Unfortunately this also stops my CommandBindings which are declared in my main window ...
I am trying to duplicate the left/center/right alignment toolbar buttons in Word. When you click the "Left Alignment" button the Center and Right buttons uncheck. I am using a WPF ListBox with ToggleButtons. The problem is the user can click the Left Alignment button twice. The second click causes the button to uncheck and sets the unde...
We have a form that contains various elements and a datagrid. When the list box is contained in a scroll viewer, all is well when we increase the size of the window. When the window size is decreased the list box remains the same height and the vertical scrollbar becomes active. If you get rid of the height binding on the list box, the l...
With this kind of design, I would like to create a functionality with which to add and delete records from the junction table. The case is from when editing an employee and selecting what exams they can take. In the left list box would be the exams that they aren't eligible for (yet, anyway) and the exams that they are eligible for on ...
Hi, I have a list box that I'm trying to populate with a list of viewboxes. The listbox takes in the list without a problem. However, when my function reaches its end, I receive the error: "Must disconnect specified child from current parent Visual before attaching to new parent Visual." The viewboxes are created from the same initial...
I am persisting the search selection criteria of a listbox onto another page which is called AreasLb. Multiple areas can be selected, I simply want to set the listbox items that the user selected as .Selected = true I think the below code should work, but it doesn't, with no items in the Listbox being selected. if (s == "Areas") ...
Hi, A potentially ignorant question, but I cant seem to find the answer. My problem is fairly straightforward -- I want to use members of the Forms.Listbox class -- not the Controls.Listbox class. However, both are defined in my code behind. How can I differentiate in XAML? Many thanks. ...
I've got this nifty little piece of code here that self-propogates ad infinitum every time the relevant method is called: if (this.ListBox_MyListBox.Items[e.Index] is MyObject) { MyObject epicObject= new MyObject(); epicObject= (MyObject)this.ListBox_MyListBox.Items[e.I...
Hello! I got a List that I add to every time I create a new Employee. The content of this list is then displayed in a Listbox. The problem is that each time I add a new Employee and then call the below method the items in the listbox gets duplicated over and over again. So if I got 3 items in the list the Listbox displays 6. I have chec...
I'm editing an item in CListCtrl control. an edit box appears where I can enter text. The event of entering the text will, however, not be catched by the LVN_KEYDOWN handler. how do I catch it otherwise? any samples? Thank you ...
Hello! I'm using the Entity Framework classes to make changes to my database like this: testEntities.Products.AddObject(product); I've got a ListBox bound to testEntities.Products and it shows them correctly, but when I add a new object and I save the changes (testEntities.SaveChanges()), the product appears into the database, but the ...
how can I differentiate between the two, when the edit field is empty in both cases? when the user hits escape, I assume user doesn't want the new value at all, when enter is hit, I assume the user wants an empty string for the edited item... ...