datatemplate Questions

4

Solved

So i basically have this ListView and i would like to press Tab and iterate through my TreeViewItems (preferrably only my TextBoxes) <ListView> <ListView.View> <GridView> <...
Nativity asked 11/8, 2011 at 1:25

4

Solved

I have WPF ComboBox inside a data template (a lot of comboboxes in listbox) and I want to handle enter button. It would be easy if it was e.g. a button - I would use Command + Relative binding path...
Mickimickie asked 25/11, 2009 at 23:13

5

I am writing a composite loosely coupled MVVM WPF application and child VMs in a parent VM are interfaces rather than class instances, e.g. public IChildViewModel { get; set; } Now how do I rend...
Alchemize asked 22/2, 2013 at 11:43

5

Solved

I have an IList of viewmodels which are bound to a TabControl. This IList will not change over the lifetime of the TabControl. <TabControl ItemsSource="{Binding Tabs}" SelectedIndex="0" > &...
Izabel asked 20/3, 2012 at 20:9

7

Solved

I have a ListBox which binds to a child collection on a ViewModel. The listbox items are styled in a DataTemplate based on a property on the parent ViewModel: <Style x:Key="curveSpeedNonCon...
Sinner asked 4/8, 2010 at 10:42

4

Solved

Since you apparently can't create a Silverlight DataTemplate in C#, I'm trying to create one in XAML. I have a converter that I need to refer to, that I have defined in C# in another namespace. I'v...
Musa asked 18/5, 2010 at 19:53

4

I have this requirement, that I have a collection of items (ObservableCollection), but I only want to display the first item. The requirement comes from the fact that in most of the case, the colle...
Fraternal asked 6/9, 2013 at 14:1

2

Solved

I am having problems getting the TextWrapping to work in this example. Can anyone see what I am duing wrong here? <ListView Name="listViewReportedException" ItemsSource="{Binding ExceptionDeta...
Quarterage asked 19/6, 2012 at 12:52

2

This may be a stupid question, but is it possible to define some sample data as DataContext in order to see my DataTemplate in DesignView? At the moment I always have to run my application to see ...
Gid asked 13/10, 2011 at 12:4

4

I have a combobox that I am populating via a CollectionViewSource. The items are build though a datatemplate for the incoming item type (in this case a ProjectViewModel). This is in WPF in .NET 4.0...
Surtax asked 25/2, 2013 at 15:51

1

I have following ControlTemplate: <ContentControl Content="{Binding ContentViewModel}"> <ContentControl.Resources> <DataTemplate DataType="{x:Type viewModel:FilledContentViewModel...
Height asked 1/1, 2016 at 15:57

3

Solved

I have a DataTemplate that represents AppBar buttons that I declare through a collection of custom AppBarCommand objects. public AppBarCommand(RelayCommand command, string buttonstyle) { Comman...
Anasarca asked 13/9, 2012 at 20:6

4

Solved

I am working on a simple UWP project using data template binding in VS 2015. When ever I try to specify the type for the Datatemplate I get an error. XAML: <Page x:Name="RootPage" x:Class="Ada...
Woodchuck asked 5/7, 2016 at 1:41

4

Well a have a little problem using a dataTemplateSelector to choose the right datatemplate for my view model based in an enum value. This is a demo that reproduces the issue. I have a hierarchy o...
Airminded asked 23/1, 2013 at 22:7

2

Solved

I am working on a WPF app and currently I have an ItemsControl bound up to my View Model ObservableCollection and I have a DataTemplate that uses a UserControl to render the items on canvas. Can yo...
Propitiate asked 1/2, 2016 at 21:45

2

Solved

I have a DataTemplate in app.xaml that binds a view to a viewmodel. <Application.Resources> <DataTemplate DataType="{x:Type vm:someviewmodeltype}"> <vw:somevwcontrol /> </D...
Cymoid asked 27/1, 2011 at 6:42

1

Solved

I'm implementing a UserControl which should display a list of settings: public class SettingPropertyItem { string Name { get; } Type ValueType { get; } object Value { get; set; } } Based on eac...
Dream asked 1/8, 2020 at 15:42

2

Solved

I have multiple videos displayed they are bound with a videocollection in Mainviewmodel. Everything works fine untill I try to bind the enter command to Mainviewmodel. I Don't know the syntax for t...
Pentosan asked 15/8, 2013 at 3:32

3

Solved

I am trying to successfully TwoWay bind an ObservableCollection to TextBoxes in a DataTemplate. I can get the data to display properly, but I am unable to change the list data through the UI. I hav...
Aec asked 30/6, 2009 at 6:34

3

Solved

I have a context menu. It's bound to some collection and it has a defined ItemTemplate like this: <ContextMenu ItemsSource={Binding ...} ItemTemplate={StaticResource itemTemplate} /> it...
Hysell asked 22/5, 2009 at 16:49

7

Solved

What is difference between a ControlTemplate and a DataTemplate in WPF?
Combustor asked 27/8, 2009 at 10:14

3

Solved

I am trying to build a dropdown list for a winform interop, and I am creating the dropdown in code. However, I have a problem getting the data to bind based on the DataTemplate I specify. What am ...
Uptodate asked 29/10, 2008 at 20:48

2

Solved

Let's say I have a collection of objects of different classes. Each class has its UserControl DataTemplated in a resource file. Now I want to use ItemsControl to display the collection, but I want...
Borgerhout asked 23/10, 2010 at 11:19

1

Solved

Databound to an ObservableCollection, I am filling an ItemsControl with Buttons. I am using UniformGrid to help evenly spread things out whether there are 5 or 5000 objects in the ObservableCollect...
Manual asked 2/6, 2019 at 20:7

2

Solved

I would like to know if there is a way to obtain a reference to a view inside a DataTemplate in a ListView in Xamarin.Forms. Supposing I have this xaml: <ListView x:Name="ProductList" ItemsSour...
Kurtzman asked 19/3, 2018 at 23:24

© 2022 - 2024 — McMap. All rights reserved.