Questions tagged [itemcollection]
18 questions
53
votes
2 answers
Basic LINQ expression for an ItemCollection
I have an ItemCollection that I'd like to query using LINQ. I tried the following (contrived) example:
var lItem =
from item in lListBox.Items
where String.Compare(item.ToString(), "abc") == true
select item;
Visual Studio keeps telling…

sourcenouveau
- 29,356
- 35
- 146
- 243
3
votes
1 answer
How do I list UIElements in ListView items?
I'm trying to access UIElements in the VisualTree of a ListView but the ItemsCollection is empty even though the ListView IsLoaded, IsInitialized and has items in DataContext.
How can I access UIElements in a ListView? Is there an event I can…

tripleb
- 75
- 5
1
vote
0 answers
Drag & Drop Item on Top or In between items in ItemsControl WPF
In my MVVM WPF application, Drag & Drop is implemented in between two ItemsControls.
The DragOver & Drop methods are implemented in ItemCollectionViewModel.
The Item in the ItemCollection is EquipmentViewModel model class.
In Drop Method, I am…

Metallic Skeleton
- 607
- 6
- 27
1
vote
1 answer
How do I find items with specific property in an ItemCollection?
I have an ItemsCollection with UserControls of different types, and need to find if any object satisfies the condition Any(p => p.GotFocus). As the ItemsCollection does not implement IEnumerable, I could cast the collection to a certain type, as…

EricaC
- 131
- 1
- 11
1
vote
0 answers
UWP C# Moving PivotItem to different index
I have this Pivot control, loaded with PivotItems.
It's all good except that I want to be able to dynamically reorder the PivotItems, without cloning the PivotItems.
The problem is that the ItemCollection of the Pivot control does not seem to be…

Jean-Marc
- 73
- 9
1
vote
0 answers
Porting from WPF to Silverlight - ItemsControl/ItemCollection
I'm porting an app (which someone else wrote) from WPF to Silverlight. I have a class which inherits from ItemsControl. In part of the code I access the ItemsControl.Items property (of type ItemCollection). However, some of the methods/properties…

Saqib
- 7,242
- 7
- 41
- 55
0
votes
1 answer
Custom combobox doesn't save Item Collection in Form1.designer.cs
I was trying to create a custom combobox that inherited from ComboBox, but I've experienced some difficulties with the DropDownBox style. I've found some code for a custom combo box on codeproject.com, and I enhanced it a bit because the combobox…

Jaques
- 2,215
- 1
- 18
- 35
0
votes
0 answers
Animate all items of a ItemCollection inside datatemplate
Is there any way to animate all the items of an ItemCollection in WP7, right now the storyboard (which is called from the codebehind) seems to be happening to only the first Item.
Also, which is the best way to access and animation inside a…

Jay Kannan
- 1,372
- 3
- 14
- 30
0
votes
0 answers
Continuous (Edge-to-Edge) Rectangles in WPF overlaps each other
I am using WPF component in my project in which there is a feature of creating rectangles with the input given as a list containing for aligning rectangle over a canvas. I have given 0.5 stroke thickness to the rectangle but not any margin or…

Divya Prakash
- 1
- 1
0
votes
1 answer
Fastest way to split Amazon DynamoDB ItemCollection into small pieces
I have a need to build a lambda function that pulls back several thousand items from DynamoDB and processes them before Api Gateway times out (29 seconds). I thought the best way to do this would be to break the collection into smaller chunks and…
user8072194
0
votes
1 answer
How do I perform a search, while an ItemCollection list is loading (error: Collection was modified; enumeration operation may not execute.)
I have a method in a thread that pulls user images, and tie the images to an ItemCollection list. while the images are being pulled, I want to be able to search through the list. I keep getting this error, Collection was modified; enumeration…

user8107351
- 367
- 4
- 20
0
votes
0 answers
WPF ListView Items Filter - Filter not triggered after refresh Items
I'm trying to add a Filter to my ListView. The filter depends on an input from a TextBox. I'm adding a filter to the ListView and trigger a Refresh if the TextBox Input is changed. My Problem: The Filter Method is only called once.
What I have:
I…

OnlyMate
- 23
- 7
0
votes
1 answer
How to access elements from an ItemCollection?
I want to access the contents of an ItemCollection that contains the items from a Treeview (called OOB).
if (OOB.Items.Count > 0)
{
ItemCollection items = OOB.Items;
foreach (TreeViewItem node in items)
The foreach throws the runtime…

zetar
- 1,225
- 2
- 20
- 45
0
votes
1 answer
How to get IndexOf Object in .Net ItemCollection
From my ViewModel, I need to programmatically move the focus and highlight of a row in a WPF DataGrid. The DataGrid has just one column:

harpagornis
- 103
- 3
- 17
0
votes
2 answers
Access or alter data from ListView
i have a simple listview like that

el-nino
- 399
- 9
- 26