datatemplate Questions

1

Solved

How can I get the Binding Path of an Element in a DataTemplate? My XAML looks like this: <GridViewColumn Header="Double"> <GridViewColumn.CellTemplate> <DataTemplate> <Tex...
Logrolling asked 19/8, 2009 at 7:18

2

Solved

Silverlight 4 is out and it seems we've missed the DataTemplate DataType functionality in this release again, which is pretty pivotal for MVVM support IMHO. For my WPF apps, at this point, I'm pret...
Uta asked 4/7, 2010 at 6:38

1

Solved

I'm try to set the Foreground colour on a Hyperlink using a Style object in an ancestor's Resources, but it's not having any effect. I even used the BasedOn tip from Changing Hyperlink foreground w...
Tufa asked 3/3, 2011 at 14:38

2

Solved

In the XAML below, I have an ItemsControl that has three DataObjects. I use a DataTemplate to display DataObjects as Buttons with an "X" on them. The Button uses a Style to set its Content. If th...
Spindell asked 2/3, 2011 at 16:23

3

Solved

I have an instance of ObservableCollection bound to a WPF listbox with two separate data templates (one for display, one for editing). The data template for editing has a one-way binding on the tex...
Koran asked 28/4, 2009 at 22:27

2

Solved

I have a CheckedListBox control which is created by adding a DataTemplate with a CheckBox to a ListView. The problem is that I need columns too. The following code doesn't display the check boxes:...
Janusfaced asked 18/1, 2011 at 14:41

2

Solved

I have two data templates, one of which is the subset of another like below: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micros...
Pulvinus asked 12/1, 2011 at 3:2

1

Solved

I have an ItemsControl using a StackPanel to display a list of items. I would like a label to appear for each row, but for the content to the left of the label to be defined by a DataTemplateSelec...
Coquette asked 31/12, 2010 at 3:39

2

Solved

I want the ContentTemplate to vary according to the value in the DataTrigger. And yes, I considered using a DataTemplateSelector, but now I need a DataTrigger or better said a MultiDataTrigger. Pl...
Karlin asked 19/1, 2010 at 0:11

1

Solved

I have a DataTemplate consisting of a media element control that is derived from MediaElementBase from the WPF Media Kit library. The MediaElementBase class provides the two properties, LoadedBehav...
Finnish asked 24/11, 2010 at 6:51

2

Solved

Is there a way to create a data template that handles a list of items? I have Contact.Phones (EntityCollection<Phone>) and I want the data template to handle the list - add remove edit etc. ...

2

Solved

say I am using WPF or Silverlight and binding a ContentPresenter to an integer property: <ContentPresenter Content={Binding Score} /> and if the score is 10 I want to display a gold star, ...
Tjirebon asked 9/11, 2010 at 17:58

6

Solved

I am trying to use the MVVM pattern for the first time. So I have an ItemsControl filled with my viewmodel objects, displayed using DataTemplate's; the objects are "nodes" and "edges" represented i...
Lorentz asked 15/5, 2009 at 18:19

1

Solved

I just want to understand the following scenario. Where I am implementing a <TabControl> bound to a ObservableCollection<TabViewModel> No Data Templates When I don't have any DataTemp...
Dejecta asked 30/10, 2010 at 9:9

1

Solved

Is it possible to explicitly use a CollectionViewSource inside a data template? Normally we'd put the CollectionViewSource in the resources alongside the template, but our model doesn't allow that ...

1

I have two DataTemplates for different cells in my Treelistview control. the templates are 90% similar. How can I reuse the identical Xaml ? <DataTemplate x:Key="@names"> <TextBlock Nam...
Codycoe asked 18/10, 2010 at 12:13

3

Solved

I'm having trouble filtering hierarchical data that's being displayed in nested xaml templates. I've got a ObservableCollection<Foo> Foos, that I'm displaying in XAML. Lets say Foo looks li...
Maggee asked 23/7, 2010 at 18:26

2

Solved

Is it possible to bind an Event in a Silverlight DataTemplate? If so, what is the best way to do it? For example, say you've created a DataTemplate that has a Button in it, like this: <UserCon...
Unshackle asked 26/3, 2009 at 8:58

2

Solved

I have a class something like: public class Section { private IEnumerable<Section> sections; private IEnumerable<KeyValuePair<string, string>> attributes public string Name {...
Markland asked 21/7, 2010 at 13:47

2

Solved

Fairly new to WPF... I have a collection of data I would like to bind to a grid panel. Each object contains its grid row and column, as well as stuff to fill in at the grid location. I really like...
Carmel asked 14/7, 2010 at 22:36

2

Solved

When I attempt to specify multiple DataTemplates for use by a ContentControl so that the correct one (based on Type) is used, I end up with Content that is simply the Content's ToString() value. &l...
Passable asked 30/6, 2010 at 12:14

2

Solved

New to WPF and have Tabs and in each tab the content is presented in a curved corner panel/window/whateveryouwannacallit. I wasn't sure how to do this ( Style, ControlTemplate ) but decided to go t...
Ailey asked 25/6, 2010 at 13:15

2

Solved

I would like to build a generic/re-usable modal dialog that I can use in our WPF (MVVM) - WCF LOB application. I have a Views and associated ViewModels that I would like to display using dialogs. ...
Misesteem asked 2/6, 2010 at 8:22

1

Solved

I am trying to create a user control within a WPF application that will serve as a DataTemplate for a ListBoxItem. The user control a grid with 4 TextBlocks. This control also contains other shapes...
Zootechnics asked 10/5, 2010 at 21:50

3

Solved

How can I create a DataTemplate in code (using C#) and then add a control to that DataTemplate? <data:DataGrid.RowDetailsTemplate> <DataTemplate> <Border> <Border Margin="1...
Rinderpest asked 10/4, 2010 at 1:52

© 2022 - 2024 — McMap. All rights reserved.