Questions tagged [itemscontrol]

Represents a control that can be used to present a collection of items.

An ItemsControl is a type of WPF Control that can contain multiple items, such as strings, objects, or other elements.

1200 questions
-1
votes
1 answer

Items must be empty before using Items source with showdialog

The problem is recurrent, unfortunately, I didn't find the solution for my case : I use an itemcontrols in a synchronized dialog (using showdialog command). The itemControls shall be defined as soon as the dialog is opened (or before, but then, I…
Hermios
  • 622
  • 1
  • 5
  • 20
-1
votes
2 answers

Binding Property of an Item in an ItemsControl From a Collection

My theory code: ScriptContainerUserControl.xaml
K. Fenster
  • 91
  • 3
  • 15
-1
votes
1 answer

Attempting to put a line in a ItemsControl with conversion

For my project I am going to have some lines drawn, and I need to check if they will be in the Visible X and Y - so I thought I'd use a multi value converter that would return the line if it is inside the X,Y else return null or something. I want to…
Fivestar
  • 323
  • 1
  • 5
  • 18
-1
votes
1 answer

WPF ItemsControl binding and the item order

I have ItemsControl in a WPF application, which is bind to an array of objects. And I am using ItemTemplate to render the list. I want to display for each item in the list the item order, like for example Customer 1 Name : xxxxx Age: 9999 Customer…
Ghassan Karwchan
  • 3,355
  • 7
  • 37
  • 65
-1
votes
2 answers

Wait for itemcontrol to render

My ItemControl is binded via ItemsSource to an ObservableCollection<...>. When I fill the collection, the program needs some (a little, but still some) time to create right ItemTemplate objects and render them in my ItemsControl. Is there any way to…
-1
votes
2 answers

WPF ItemsControl Binding to UserControl

I have a WPF application where I need to do something like that :
danbord
  • 3,605
  • 3
  • 33
  • 49
-2
votes
1 answer

How to fill a row of an ItemsControl when there is still an extra space remaining?

My goal here is to have 3 columns when displaying my data in an ItemsControl. I have found that most of the answers regarding this matter, is to use a UniformGrid. Like so:
paraJdox1
  • 805
  • 9
  • 23
-2
votes
1 answer

The ObservabaleCollection add/remove doesn't update the ItemsControl on the xaml side

Lets say I have a class for my data: class MyData { public string FirstName {get;set;} public string LastName {get;set;} } And then in my view model I have class MyViewModel : ModelBase // assume this has all the work behind for prop…
Tiger Galo
  • 289
  • 4
  • 15
-2
votes
1 answer

Values in Int Array aren't being changed by Slider (itemsControl)

I have an int array, which I'm using to create a bunch of sliders in an ItemsControl. I'm using a two-way binding on the sliders, but the array never gets set (I put a breakpoint on the setter). All of this is in a UserControl. UserControl…
-2
votes
1 answer

WPF: Differentiate Items in ItemsCOntrol

I have the same ItemsControl I use to display multiple Combo boxes. Ex. The same template is used to display, sometime combo box with some names, and sometime combo box with some firstnames, according to the items list which is bound to the…
Ch4BRN
  • 43
  • 4
-2
votes
1 answer

Align items in ItemsControl horizontally (no xaml)

I am looking for a way to set the alignment of the items in an ItemsControl so that they are not positioned from top to bottom (default) but from left to right. I thought there is a property that can easily be set, like ItemsControl crtl = new…
Kjara
  • 2,504
  • 15
  • 42
-2
votes
1 answer

How to Override PropertyChangedCallback of a predefined Dependency Property ItemsSource in a WPF ItemsControl

How to Override PropertyChangedCallback of a predefined Dependency Property ItemsSource in a WPF ItemsControl. I developed a WPF Custom Control inherited from ItemsControl. In that I used the predefined Dependency Property ItemsSource. In that I…
-2
votes
1 answer

Can you get the container type from a given ItemContainerGenerator?

Given an arbitrary ItemsControl, is it possible to get the type of the container objects which its ItemContainerGenerator creates/uses? For example, given a ListBox, I'm trying to get the type ListBoxItem. For a TreeView, it would be TreeViewItem,…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
-3
votes
1 answer

"Canvas" methods doesn't work in itemsControl

Canvas methods always work when they are in a canvas tag, but When you tryna use them in an itemsControl, they sometimes stop working. here's an example:
Danial
  • 23
  • 8
1 2 3
79
80