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
2 answers

How to sort ItemsSource dynamically in C#; WPF

I use in XAML an ItemsControl where and in its ItemsSource I make a Binding for an Enum, thus creating a list of RadRadioButton dynamically, and if someday another item is added to this enumerator my code will already create this new button and show…
-1
votes
1 answer

Combobox data binding inside ItemsControl

I have combobox inside a ItemsControl. How to bind the selected value of the combobox to the ItemsControl items with object not with int value. When i change the combobox everything is working well but after changing the PersonList with the new…
nihasmata
  • 652
  • 1
  • 8
  • 28
-1
votes
1 answer

How to use alternationindex on code behind wpf

I have Itemcontrol in WPF. And Items source using Binding property.Items are only one button How can I show index of item when I clicked Button? I read about AlternationIndex but only show on the xaml page.
-1
votes
2 answers

WPF How to find a specific control in an ItemsControl with data binding

I have an ItemsControl which is bound to a list:
-1
votes
1 answer

How to replicate behavior of standard list elements to instantiate child items in WPF?

I'm creating a Wizard control based on Selector. My plan is that it will behave in the similar way to TabControl, ListBox, etc. - by having its own child items. What I already did is: public class Wizard : Selector { // ... protected…
Spook
  • 25,318
  • 18
  • 90
  • 167
-1
votes
1 answer

ItemsControl not updating when adding a new item after replacing parent with clone

I am implementing Undo/Redo for my .NET 5 application. I have an ObservableCollection of Activity objects (the collection is named Activities). Each Activity object contains two ObservableCollections "ActionItems" and "Notes". The Activities…
-1
votes
1 answer

Highlight item in 1st ItemsControl on selection of same item inside 2nd ItemsControl and also show that selected item in a textbox

I have a list of strings in the main window class and two ItemsControl binded to same list and SelectedItem dependency property. What i did i used Button itemtemplate for the 2nd ItemsControl and on Button Click event i am able to get the value of…
-1
votes
1 answer

(WPF) How can I find ancestor about two ItemsControl in code behind?

I have a ItemsControl(A). ItemSourece is a Class "Account".It contains some controls and another ItemsControl(B). ItemsControl(B) includes some CheckBox. It's ItemSourece is ObservableCollection included in Class "Account". CheckBox's Content is…
-1
votes
1 answer

ItemsControl not showing items

It has been while since I worked with XAML on a regular basis and I am struggling with the basics. I am trying to show items in an ItemsControl like so:
Marc
  • 12,706
  • 7
  • 61
  • 97
-1
votes
1 answer

Wpf. Color a rectangle depending on the object property from array

I want to color a rectangle depending on the object property from array. I use
dmitriy
  • 256
  • 2
  • 17
-1
votes
2 answers

ItemsControl inside Popup duplicates the first item added

I have an ItemsControl inside a Popup with an ObservableCollection, which I'll refer to as simply 'Collection', bound to the ItemsControl.ItemsSource property. The ItemsControl will always duplicate the first item added to the Collection. The…
Jack
  • 886
  • 7
  • 27
-1
votes
1 answer

WPF: Get control TextBox at ItemControl

I have a ObservableCollection binding in ItemsControl. In this ItemsControl is created some TextBoxes, one for each object in ObservableCollection. Now I need to select text and highlight it depending the selected object but I'm not able to do it.…
SirCris85
  • 9
  • 2
-1
votes
1 answer

Ellipse as radio button

In my project, I have a little color picker that is in fact an ItemsControl with SolidColorBrushes as items, and an Ellipse as ItemTemplate. I want the user to pick a color, when he clicks the Ellipse I want the BorderThickness to go from 0 to 2, in…
Fabi
  • 199
  • 1
  • 14
-1
votes
1 answer

Datatrigger with DynamicResource works only on last item in ItemsControl

My DashBoardSimpleCountObject has 2 values: MyName and MyValue. I use an ObservableCollection called MyData. I want to show a picture, as long as MyValue is null. However, the picture ("loading") is only shown at the last…
-1
votes
1 answer

Fill WPF ItemsControl Property in XAML

I have defined a readonly dependency property of type ToolBar to my control. How can I populate this ToolBar with Items in xaml code? The ToolBar is created in constructor of my control and is readonly. I can write
redstripes
  • 87
  • 1
  • 9
1 2 3
79
80