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

items are not displayed after grouping in ItemsControl

I've added grouping to ItemsControl:
Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119
0
votes
1 answer

How do I add a dynamic list of MediaElements to a StackPanel in Silverlight 5?

I am working in C# and Silverlight 5, and I am trying to display one or more audio and/or video files that have been retrieved from a database table as a byte array. I decided the best way to get those byte arrays into a usable format was to create…
0
votes
2 answers

Setting VisualState on ItemsControl item Templates

I have an ItemsControl with an ItemTemplate that is bound to a data item. The ItemTemplate is quite complicated and I have added some visual state to it so that I can change it's appearance. I want to be able to switch all the items VisualState to…
Tristan
  • 159
  • 9
0
votes
2 answers

Add Controls to GroupBox which was created dynamically

I add GroupBoxes to an ItemsControl dynamically using: string name_ = "TestName", header_ = "TestHeader" GroupBox MyGroupBox = new GroupBox { Name = name_, Header= header_, Width = 240, Height = 150, Foreground=new…
philkark
  • 2,417
  • 7
  • 38
  • 59
0
votes
1 answer

How can I set a style trigger on the GroupBoxes of my ItemsControl without losing their current style?

When I set a style trigger on the children (GroupBoxes) of an ItemsControl the style I've previously applied to GroupBoxes is lost and it renders with default style.
user13070
  • 511
  • 1
  • 5
  • 14
0
votes
2 answers

How do I bind IsChecked property of CheckBox within an ItemsControl?

I've got the following ItemsControl that gives me a check box for every database within the available collection. These checkboxes allow the user to select which ones to filter on. The databases to filter on are in a separate collection…
bsh152s
  • 3,178
  • 6
  • 51
  • 77
0
votes
1 answer

Access named item inside ItemTemplate

I have the following scenario:
Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
0
votes
1 answer

showing different user controls - WPF MVVM

I created a dbml file, which automatically created the designer.cs In the designer.cs (which is the Model in the MVVM) there are two different classes in the database: ElementA and ElementB. I have two user controls: Element_A_UserControl - displays…
Dazy Jackson
  • 85
  • 1
  • 4
  • 12
0
votes
4 answers

ItemsControl Bar Chart Scaling of the bars

EDIT: added code Also since the DateTimes are not really Datetimes (sTrings in hh:mm:ss format) i decided to just use Strings instead and use TimeSpan to retrieve the totalMinutes.
PeterP
  • 741
  • 1
  • 8
  • 20
0
votes
1 answer

Matching vertical layout in different ItemsControls

I have ListView that uses a GridView to display several columns of data. Two of the columns have cell templates containing ItemControl's to show a small collection in each cell. The problem I have is that the vertical size of the ItemControls is not…
GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103
-1
votes
0 answers

WPF How do I bind an ItemContainerStyle property to ItemTemplate DataTemplate Control?

I have an ItemsControl with an .ItemsPanel> that has a . What I want to do is to bind Canvas.Left and Canvas.Top from the .ItemContainerStyle> to an .ItemTemplate> that has a custom control with a read-only…
-1
votes
0 answers

Add values in datagridview to listview in vb.net?

I have same problem with transfer data from datagridview to listview I tried it but its not working..because my data gridview is in another form and my listview is in another form..i want if i click button my records in datagrid will be transferd…
-1
votes
1 answer

Edit the canvas.Top and Left in itemsControlTemplate wpf

So I'm using mvvm to bind some elements in an item control witch has a canvas in the ItemsPanel. I want to change Canvas.Top and Left of the elements inside itemsControl when ever it's clicked. xaml file:
Danial
  • 23
  • 8
-1
votes
1 answer

Some Properties are not binding when used in ItemsControl

I have an ItemsControl element that populates a Stackpanel. Its bound to a ObservableCollections full of "LedModel" objects (see below). I cannot get the binding for Brush, Size and BlurRadius to work. Oddly enough however the binding for the Label…
JakobSailer
  • 15
  • 1
  • 4
-1
votes
1 answer

ItemTemplate for UserControls in ItemsControl - WPF

My task is to implement a MDI-like interface in our WPF app. I have created this simple class as a base for all the views: public class BaseView : UserControl, INotifyPropertyChanged { public event PropertyChangedEventHandler?…
brt99
  • 13
  • 5