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
4
votes
1 answer

finding label in itemTemplate and bind data from code behind

I wanted to display value in a label (label inside itemTemplate) i have tried this approach string s = null; SelfCollectNameSpace.SelfCollect address = new SelfCollectNameSpace.SelfCollect(); s = address.getSelfCollectAddress(orderNoTracking); …
user3643092
  • 426
  • 1
  • 8
  • 20
4
votes
2 answers

Binding with Static properties in ListView ItemTemplate

I'm having some problems with WPF binding. I have an assembly with some const properties in class Values, that correspond to columns from datatable. I want to bind the value from a column to a TextBlock using the const property to specify the…
Paulo
  • 609
  • 1
  • 11
  • 27
4
votes
1 answer

Dont treat underscore as Alt in context menu

I am trying to populate my ConextMenu in code. I am adding some MenuItems in it. A MenuItem contains a string and event. So problem I am facing is that if the string contains underscore (_) then menu treats it as alt key. So in context menu I see…
fhnaseer
  • 7,159
  • 16
  • 60
  • 112
4
votes
2 answers

Any way to modify existing files in a Visual Studio Template?

I'm currently using a "New Item" template of mine to create several classes in my project based on the Name entered. What I'd like to be able to do, is to also add some lines to an existing file in the project. Is there any way to do this? Is there…
Dov
  • 15,530
  • 13
  • 76
  • 177
4
votes
3 answers

wpf combobox with custom itemtemplate text

I have ComboBox with custom ItemTemplate.
takayoshi
  • 2,789
  • 5
  • 36
  • 56
4
votes
1 answer

Dynamic Load ListView Template from .ascx

I use this http://blogs.msdn.com/b/mikeormond/archive/2008/07/26/dynamically-loading-listview-templates.aspx article as example for dynamic loading templates(from .ascx files). this is author code: protected void Page_Load(object sender,…
Anton Putov
  • 1,951
  • 8
  • 34
  • 62
4
votes
2 answers

WPF treeview ItemTemplate and ItemTemplateSelector are ignored

In my application, I have been getting this error each time the treeView loads it's items. This error makes my application slow on load and takes at least two minutes to load. The error is: System.Windows.Data Error: 26 : ItemTemplate and…
Rui
  • 387
  • 7
  • 22
3
votes
1 answer

TreeView.IsSelected trigger does not work properly

I am trying to change SelectedItem template in TreeView. I wrote simple container style and change item template in Style.Triggers as described [1]: How do I highlight a treeview selected item with some color? or [2]: WPF TreeView: How to style…
Victor Chekalin
  • 676
  • 1
  • 8
  • 15
3
votes
4 answers

ComboBox with ItemTemplate that includes a button

So, lets say I have a ComboBox with a custom data template. One of the items in the data template is a button:
Brian Genisio
  • 47,787
  • 16
  • 124
  • 167
3
votes
1 answer

How to set the update panel trigger for the control inside repeater control?

I've used ajax update panel in my web page. I want to set the trigger on the update panel. I have asp.net link button control placed in the asp.net repeater control. The content on the update panel should update when i click on the link button from…
Priyanka
  • 2,802
  • 14
  • 55
  • 88
3
votes
1 answer

VS 2010 SDK. Templates

If you try and create an MVC3 project, you’ll see that you have an ability to add Controller or View with rc. And context menu you get on Controller folder with rc will magically suggest to add Controller while on the Views you’ll be suggested to…
3
votes
1 answer

Find ItemTemplate control in TreeView

My tree definition is:
alex2k8
  • 42,496
  • 57
  • 170
  • 221
3
votes
1 answer

How call a wizard to add new Item Template

I have a project template that is generated through a wizard. Now i want to add a new item template through the same wizard. How can i invoke the wizard at the moment that i add the new item template. Example: [Add to Project…
3
votes
2 answers

Binding inside listbox itemtemplate problems

I have two separate binding problems with listboxes with an itemtemplate which contains a texbox. 1) One listbox binds to a list of strings. How can I display each string inside the textboxes created and allow two way binding at the same time? Two…
muku
  • 238
  • 1
  • 7
  • 20
3
votes
2 answers

Why does C# expect a ";" in my ItemTemplates?

I have a page with the following code: Edit
Vivian River
  • 31,198
  • 62
  • 198
  • 313