Questions tagged [itemssource]

374 questions
0
votes
3 answers

How to Bind ObservableCollection Class to DataGrin in WPF

All, I am creating a data set which is 'bound' to a DataGrid at run-time. I pull in some data that is used to build a class which is inheriting from ObservableCollection. The class in question is public class ResourceData :…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
0
votes
1 answer

datagrid columns more than one sources for bindind

Hello I have a datagrid which has 10 columns. The first take their values from the itemsource property of the datagrid. But the last two I want them to take their values from an other source. To be specific , the item source both times is a list of…
jmlaios
  • 119
  • 3
  • 11
0
votes
2 answers

adding elements to combobox from a list

My problem: I have a listbox with owners of dogs, and i have a listbox with dogs. I want to modify the dogs listbox itemtemplate as the following: DogName(textblock)+DogKind(textblock)+Owners(combobox).The first two was successful, but i cant add…
fzl
  • 171
  • 2
  • 10
0
votes
2 answers

Disabling a TreeView item bound to an ItemsSource defined in xaml

I have a TreeView that I am binding to an ItemsSource that creates a CheckBox for each item. Here is the xaml:
Saggio
  • 2,212
  • 6
  • 33
  • 50
0
votes
1 answer

Remove item click event handler for single items in GridView

In my Windows Store app I use a GridView with an ItemClick event handler: The items are bound to the GridView with…
Benny Code
  • 51,456
  • 28
  • 233
  • 198
0
votes
1 answer
0
votes
2 answers

How can I change the value of the selectedIndex in a RadListPicker

In my Windows Phone app, I'm overriding the OnNavigatedTo method to populate a RadListPicker with some information. I have two arrays: one is a pre-filled DateTime array of size n, the second is a pre-filled string array of size n. I wanted to…
Freakishly
  • 1,533
  • 5
  • 32
  • 61
0
votes
0 answers

Missing a binding somewhere

Working on an mvvm demo project (not homework) Class Friends which inherits ObservableCollection Class Friends ToString is FirstName + " " + LastName, etc ViewModel with a Friends and SelectedFriend property ComboBox ItemsSource is bound to the…
j2associates
  • 1,115
  • 10
  • 19
0
votes
1 answer

should we set ItemsSource again or update view model

I have a view model (an ObservableCollection list) set as ItemsSource for a ListBox. When I refresh this view model (get new data from network), should I set ItemsSource again, or just let it notify the ListBox ? Which solution gains the most…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
0
votes
1 answer

WPF: Avoid CustomCombobox to fire SelectedItem Binding when changing ItemsSource to CompositeCollection

I have a Custom Control derived from a ComboBox where I use a CompositeCollection to "merge" the original ItemsSource with additional Objects. The problem is, that CompositeCollection comp = new CompositeCollection(); SomeLogic(); ItemsSource =…
Steav
  • 1,478
  • 13
  • 28
0
votes
1 answer

In WPF I have a TreeView whose ItemsSource is binded to a static resource. How can I change this so that the tree updates when the items change?

I have a TreeView whose ItemsSource is binded to StaticResource, which is a class. This has worked fine for me, but now I have a function that updates the lowest level of the TreeView with possible different values and this update needs to be shown…
Kevin Quiring
  • 639
  • 1
  • 11
  • 26
0
votes
1 answer

How to bind WPF ContextMenu ItemsSource?

I'm trying to bind Button's context menu this way: (UserControl has Values property). Why…
Evgenyt
  • 10,201
  • 12
  • 40
  • 44
0
votes
1 answer

Custom Panel InternalChildren order differs from bound ItemsSource

I'm writing a custom ItemsControl and Panel that arranges items vertically in the order in which they were added to the ItemsSource bound to the ItemsControl. Note that this is just a prototype of the final Panel, whose arrangement will be a bit…
Zodman
  • 3,178
  • 2
  • 32
  • 38
0
votes
2 answers

Setting ListBox ItemsSource to an object from StaticResource as shown in MSDN

I was exploring DataTemplate and found Styling and Templating on MSDN. It says - "In this sample application, there is a ListBox control that is bound to a list of photos:
atiyar
  • 7,762
  • 6
  • 34
  • 75
0
votes
3 answers

Setting ItemsSource before or after adding items changes object?

I have a bit of a weird situation, I've implemented a ObservableConcurrentDictionary (based on the ConcurrentDictionary from .NET), which I used to implement ObservableConcurrentCollection (which just automatically sets the Key property in the…
The Cookies Dog
  • 1,915
  • 2
  • 22
  • 38
1 2 3
24
25