Questions tagged [itemsource]
134 questions
45
votes
4 answers
Why does the DataGrid not update when the ItemsSource is changed?
I have a datagrid in my wpf application and I have a simple problem. I have a generic list and I want to bind this collection to my datagrid data source every time an object is being added to the collection. and I'm not interested to use observable…

Pouyan
- 2,849
- 8
- 33
- 39
13
votes
1 answer
ItemSource vs Datacontext in wpf
Can any one give me the difference between Itemsource and DataContext of Listview in WPF?
With example

Sauron
- 16,668
- 41
- 122
- 174
4
votes
1 answer
UniformGrid and ItemsSource
I have a UniformGrid. Inside, I would like to put a Grid which contains 2 children - and Image and a Canvas. I already have a List member which contains a Grid with that definition.
I'm updating the source of the Image from null to an actual…

Idanis
- 1,918
- 6
- 38
- 69
3
votes
2 answers
GeneratorPosition Error on Bound Observable Collection
I am using a Transitionals Slideshow control which has an observable collection of strings bound to the itemsource. These strings are the file paths to each picture in the slidehow. When I first load the WPF app, it runs this method correctly (using…

sunriser
- 95
- 1
- 6
3
votes
1 answer
ItemsControl ItemsSource lazy loading
Image you are creating a custom control behaving like ComboBox in WPF.
As a source of items you provide IQueryable (or any kind of IEnumerable collection),
but you don't want to allow the control to call GetIterator() and iterate through it (some…

theSpyCry
- 12,073
- 28
- 96
- 152
3
votes
1 answer
How to dynamically bind the ItemSource of a ListView which has ItemTemplateSelector containing Multiple DataTemplates which have Different DataTypes?
I have an ItemTemplateSelector which contains Multiple DataTemplates which have Different DataTypes.
I thus have multiple ItemSources based on Module Selected.
How to bind my ListView with multiple ItemSources based on the module…

Prithvi
- 33
- 4
3
votes
1 answer
Retrieve data from a listview
In my Windows store app there is a list view which is using an item source to get data. It looks like this:

udi
- 303
- 1
- 6
- 19
3
votes
2 answers
Combo box Item source = ObservableCollection & I need a '-None-' dummy entry at the top
I have a combo box using an observable collection as a datasource and I want a "dummy" value of "None" as the first item in the box as it controls filters against other data sources.
Other databound objects also use the same observable collection so…

James
- 31
- 3
3
votes
1 answer
Add DataGrid checkboxcolumn with different values in different rows
I got a DataGrid that is bound to an object PlacementData (PD). PD has a property "P_Unit".
public class PlacementData
{
public bool PIsChecked { get; set; }
public string PlacementHeader { get; set; }
public string P_NumberOfCases {…

Tvd
- 4,463
- 18
- 79
- 125
2
votes
1 answer
How to dynamically add elements in listbox.itemsource in wp7?
I have a listbox with datatemplate, with 2 textblocks which binding some properties of some class,i have a list with elements of type of that class,i want to dynamically show this elements i.e at first show first 20 elements, than next 20 and etc,…

Vahan
- 3,016
- 3
- 27
- 43
2
votes
1 answer
Binding the IsSelected property of ComboBoxItem in DataTemplate UWP
I am trying to bind on property IsSelected of ComboBoxItem in order to show correct icon, if item is selected the red icon should be shown, otherwise gray for the rest of the opened list. The way how am I trying to achieve that functionality is…

mata94
- 43
- 4
2
votes
2 answers
ItemsControl-wrapping the contents inside the window
I am using an ItemsControl inside a window in WPF. The itemscontrol is bound with a collection and the collection is a group of view models(user controls). My problem - the view is going beyond the current window as a result of many view models in…

Jimmy
- 3,224
- 5
- 29
- 47
2
votes
1 answer
WPF Data-Bound Datagrid Filtering / Searching
I have a WPF application which uses a (currently) local database to act as a binding source. Using the Visual Studio 2010 tools I have a LINQ-SQL model which acts as the Datacontext for most forms.
What I have is a UserControl with a TextBox and…

LiamV
- 1,138
- 1
- 14
- 21
2
votes
1 answer
in WPF I need to have a collection of a collection of drawing objects
I have a WPF project that draws several things in a panel. For the next release I need to add another type of thing to draw in addition to the existing things. Currently I have a grid that contains an ItemsControl which contains an ItemsPanel and…

dtaylor
- 997
- 3
- 10
- 26
2
votes
1 answer
WPF DataGrid cell binded on a parent property
I have a DataGrid that has the ItemSource property binded to a propery from my model.and i want to have a combobox column in the grid binded also to a property form the same model, not inside the property object that is binded on…

Ovy.Istrate
- 474
- 3
- 15