What is the difference betweeen the following:
SelectedItem
SelectedValue
SelectedValuePath
All these dependency properties are defined in Selector class. I often confuse SelectedItem with SelectedValue , and SelectedValue with SelectedValuePath.…
How can I retrieve the item that is selected in a WPF-treeview? I want to do this in XAML, because I want to bind it.
You might think that it is SelectedItem but apparently that does not exist is readonly and therefore unusable.
This is what I want…
I have a method:
private void DeletePuzzle(object param)
{
}
param is a System.Windows.Controls.SelectedItemCollection, that I got from a WPF ListView's SelectedItems property.
Somehow, I can't seem to cast it from an object to anything useful. I…
I have a DataGrid, bound to Database table, I need to get the content of selected row in DataGrid, for example, I want to show in MessageBox content of selected row.
Example of DataGrid:
So, if I select the second row, my MessageBox has to show…
I have a Java Desktop Application with JavaFX 2 in it and in my FX I've got a TabPane. I want to set the default tab. In other words I want to set a tab as selected. I found that there are multiple ways to find out which tab is selected and I found…
The selected item in a WPF TreeView has a dark blue background with "sharp" corners. That looks a bit dated today:
I would like to change the background to look like in Explorer of Windows 7 (with/without focus):
What I tried so far does not…
I Have a wpf Listbox that display's a list of textboxes. When I click on the Textbox the Listbox selection does not change. I have to click next to the TextBox to select the listbox item. Is there some property I need to set for the Textbox to…
public class ComboboxItem {
public string Text { get; set; }
public string Value { get; set; }
public override string ToString() { return Text; }
}
private void comboBox1_SelectedIndexChanged(object…
I have a list view contactslist. I wrote the code for highlighting the selected item in the ListView. It is working. When I click on one item it is highlighting that item, but the problem is if I click on another item it is highlighting that one…
We want to set the SelectedItem of a ListBox programmatically and want that item to then have focus so the arrow keys work relative to that selected item. Seems simple enough.
The problem however is if the ListBox already has keyboard focus when…
I am new to android, I have a code in which I have placed buttons in list view.
My list is as..
Number | Name | ID (visibility = gone) | Level | button1 | button2
Function is different in button 1 and button 2 case. I have applied listeners on…
Can anyone help with the following - been playing about with this but can't for the life of me get it to work.
I've got a view model which contains the following properties;
public ObservableCollection Rules { get; set; }
public Rule…
In my tab SelectionChanged event (is this the correct event, I can't find a tab changed event?), how do I access the new tab?
Also from outside this event in normal code, how do I access the currently selected tab?
TabControl.SelectionChanged +=…
My WPF ComboBox contains only text entries. The user will select one. What is the simplest way to get the text of the selected ComboBoxItem? Please answer in both C# and Visual Basic. Here is my ComboBox:
…