Questions tagged [itemtemplate]

A WPF/Xaml DataTemplate used to display each item in an ItemsControl.

A WPF/Xaml DataTemplate used to display each item in an ItemsControl.

555 questions
5
votes
1 answer

ItemTemplate: ListBox vs ItemsControl

I'm quite new to the WPF world and I'm having some problems with templating items in an ItemsControl. What I need is to template elements (mostly buttons) inside an ItemsControl (or the like). If I'm using the following XAML code…
null
  • 7,906
  • 3
  • 36
  • 37
5
votes
2 answers

ListBox Disabled state in Silverlight 4

So I'm styling a ListBox and I've got to the part where I need to do a greyed out style when the ListBox is disabled. However when I look a the states tab in Blend, there's only Validation States present - no sign of the usual Common States which…
Darko
  • 38,310
  • 15
  • 80
  • 107
5
votes
1 answer

MvvmCross : dynamic item template selection for MvxListView

If I have a view with the following MvxListView definition:
Klaus Nji
  • 18,107
  • 29
  • 105
  • 185
5
votes
6 answers

Windows 8 XAML ListView with Header and Item Template columns should have same dynamic width

I am using a Listview with an Itemtemplate and a Headertemplate. Both templates contain 6 Columns. Everything is ok if i set a fixed column width for the templates - like in figure one. But i want to set the width to "Auto" for the items - but then…
user1525243
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

WPF - Implement ItemTemplate for an ItemsPresenter?

I've been working on a SplitButton control for WPF and its basically done, but I'm trying to go through all the possible properties that can be set on it and make sure they are actually implemented. I mostly have only two properties left to…
Thrash505
  • 369
  • 2
  • 4
  • 16
4
votes
2 answers

How can I use a custom TabItem control when databinding a TabControl in WPF?

I have a custom control that is derived from TabItem, and I want to databind that custom TabItem to a stock TabControl. I would rather avoid creating a new TabControl just for this rare case. This is what I have and I'm not having any luck getting…
Russ
  • 12,312
  • 20
  • 59
  • 78
4
votes
1 answer

ComboBox.ItemTemplate for multiple controls

I have 10 ComboBox controls that will use the same item template (an Image and a Textblock), and the same items, so I want to define this template on a more global scale (page level). This is what I've done so far:
Adrian Marinica
  • 2,191
  • 5
  • 29
  • 53
4
votes
4 answers

How can I prevent duplication of the content in itemtamplate for the alternating template in repeater?

Is there a way to prevent duplication ot an itemtemplate content which will just appear with a different css class for the alternating template block?
pencilCake
  • 51,323
  • 85
  • 226
  • 363
4
votes
5 answers

WPF - ItemTemplate not acting as expected

I have a UserControl which I'm using to display a list of UIElements. The control consists of a single ItemsControl with it's ItemPanelTemplate switched for a horizontal StackPanel, its ItemsSource bound to a DependencyProperty exposed by the…
EightyOne Unite
  • 11,665
  • 14
  • 79
  • 105
4
votes
3 answers

multiple userControl instances in tabControl

I have a tabControl that is bound to an observable collection. In the headerTemplate, I would like to bind to a string property, and in the contentTemplate I have placed a user-control. Here's the code for the MainWindow.xaml:
Jowen
  • 5,203
  • 1
  • 43
  • 41
4
votes
4 answers

ASP.net access control in FormView ItemTemplate

I have a form view with an item template with a control inside, is it possible to access that control OnDatabound so I can bind the control with data. I'm using a panel as an example here.
Funky
  • 12,890
  • 35
  • 106
  • 161
4
votes
1 answer

WPF update two values when a property is changed

I've run into some difficulty with the following XAML:
Rolan
  • 2,924
  • 7
  • 34
  • 46
4
votes
1 answer

DataTemplate for a DataType - how to override this DataTemplate in a particular ListBox?

I have created several DataTemplates for some of the DataTypes in my pet project. These data templates are really cool as they work like magic, magically transforming the look of the instances of the data types whenever and wherever they show up in…
Peter Perháč
  • 20,434
  • 21
  • 120
  • 152
4
votes
1 answer

WPF Listbox with usercontrol as ItemTemplate DataTemplate Binding Issue

I have created a simple MVVM wpf project. The basic Idea is to display data about the annual Income of a customer and the loans he has with various Banks. The Model consists of 2 Classes , Financial and FinancialLoans. The ViewModel consists of 2…
dmans1
  • 49
  • 1
  • 4
4
votes
2 answers

How to get current item in ItemTemplate in Xamarin Forms

I set template for item ListView and assign list items listView.ItemTemplate = new DataTemplate(typeof(CustomVeggieCell)); listView.ItemsSource = posts; How to get currentItem element in CustomVeggieCell: CustomVeggieCell.class: public class…
Ihor Levkivskyi
  • 341
  • 5
  • 14
1 2
3
36 37