datatemplate Questions

1

I have a longlistselector with certain images that i add in this longlistselector. I also change the margins of this image to make the image go up or down and so on. But i want to put this image in...
Demission asked 3/3, 2014 at 15:46

3

Solved

I have added a DataTemplate to a ListBox class to bind my collection to: <ListBox x:Name="lstEmails" Height="259" Margin="12,0,12,41" Width="276" SelectionChanged="lstEmails_SelectionChanged"&...
Ain asked 3/2, 2010 at 12:49

2

Solved

I want to do the following at runtime in code: <DataTemplate x:Key="lightGreenRectangle"> <Rectangle Fill="LightGreen"/> </DataTemplate> So far I've got: public DataTemplat...
Paroicous asked 8/12, 2011 at 8:11

3

How do i add controls to datatemplates programmatically? For Example. Below I've created TextBlock and DataTemplate. TextBlock text = new TextBlock(); DataTemplate template = new DataTemplate(); ...
Hub asked 29/3, 2011 at 10:57

2

I am trying make my own version of a control, say a TextBox, to which I want to add some custom UI. I am want to inherit from this class, so that the user can still call my special text box in the ...
Silique asked 20/8, 2014 at 9:48

2

Solved

I'm using ItemsControl to hold my collection. The ItemsPanel is a Canvas, the ItemTemplate is a block of Border>StackPanel>TextBlocks I want to bind a command in the DataTemplate to catch the click...
Recalcitrant asked 22/7, 2014 at 2:47

3

Solved

Is there a short way to make a FooterTemplate (in a GridView) always visible, even when DataSource is empty?
Export asked 15/6, 2009 at 7:39

1

I have a C# Store App and using DataTemplate Selectors to determine which type of Template to use in a ListView Control bound to an Array. Because it is templated, I cannot assign a dynamic x:Name ...
Playroom asked 14/5, 2014 at 3:53

1

Solved

I have the following DataTemplate in resources that I would like to reuse throughout a GridView. <Window.Resources> <DataTemplate x:Key="NumericalDataTemplate" DataType="GridViewColumn....
Greaser asked 16/4, 2014 at 9:3

2

Solved

Can someone explain me how the code I am using here can work? <Window.Resources> <DataTemplate DataType="{x:Type VM:PBRKEntryViewModel}"> <V:Overview /> </DataTemplate> ...
Lightening asked 19/3, 2014 at 11:24

1

I've been experiencing some strange behaviour when referencing StaticResources from inside a DataTemplate defined in a ResourceDictionary. In this example, I fill a listbox with the numbers 1 to 9...
Brenner asked 7/3, 2014 at 9:7

3

I'd like to display search results within a WPF ItemsControl with the query terms highlighted. The search engine I use, Lucene.Net with the Highlighter plugin, returns strings with the query terms...
Zebapda asked 16/9, 2010 at 16:17

3

Solved

I have an ItemsControl that binds to a list of items. These items have a name and value property. The value property is of type Object to allow different datatypes to be used. To display the value ...
Insurrectionary asked 3/2, 2014 at 15:42

4

Solved

I want to show a list of Customer objects in a WPF ItemsControl. I've created a DataTemplate for this: <DataTemplate DataType="{x:Type myNameSpace:Customer}"> <StackPanel Orientation="H...
Jumble asked 12/2, 2009 at 15:48

1

I'm looking for a solution and/or the rationality behind why a Binding instance is shared within a DataTemplate. This ultimately comes down to the fact that within a DataTemplate, there's seemingly...
Margaritamargarite asked 25/4, 2012 at 23:51

2

Solved

I have the following code DataTemplate for rows <!-- Template for each item in ListView --> <DataTemplate x:Key="ItemTemplate"> <Grid> <Grid.ColumnDefinitions> <C...
Selfreliant asked 26/12, 2013 at 11:39

1

Solved

I have the following problem: <DataTemplate x:Key="OrganisationsItemTemplate"> <StackPanel VerticalAlignment="Top" Margin="5,0,0,0"> <Button Command="{Binding Path=DataContext.Loa...
Mccurdy asked 17/10, 2013 at 22:52

2

Solved

I do not get the correct Binding syntax to access the Cats and Dogs properties of MyViewModel within a DateTemplate that defines a CompositeCollection within its resources. public class MyViewMode...
Towelling asked 8/10, 2013 at 8:49

5

Solved

I have an MVVM application that requires basic backward/forward navigation between screens. Currently, I have implemented this using a WorkspaceHostViewModel that tracks the current workspace and e...
Cerulean asked 10/1, 2012 at 17:59

3

Solved

Ok, this is an embarassingly simple-looking problem, but is driving me crazy. I'm learning about DataTemplating and am trying to apply a very VERY simple ItemTemplate to a ListBox. However, when I...
Earlineearls asked 16/3, 2010 at 17:26

2

Solved

I created a ListBox that has a DataTemplate as Itemtemplate. However, is there an easy way to access the generated UIElement instead of the SelectedItem in codebehind? When I access SelectedItem, ...
Shaylyn asked 4/3, 2009 at 12:33

3

I have made a sample demo VS 2010 RC sample project, because in my production project I have the same error using MVVM. In my sample demo project I use only Code-behind without 3rd party dependenc...
Grof asked 2/4, 2010 at 9:8

3

I'd like to visualize the following data structure using TreeViews in WPF: class MyDataContext { ICollectionView Outers {get;set;} //... } class Outer { string Name {get;set;} IEnumerable<I...
Davao asked 19/7, 2013 at 8:56

1

Seems I've hit a wall trying to use DataTemplates on my DataGrid. What I'm trying to do is to use one template to show two rows of text for each cell. But it doesn't seem to be possible to Bind the...
Centerboard asked 4/7, 2013 at 12:47

2

Solved

In MainWindow we have: <HeaderedContentControl Content="{Binding Path=Workspaces}" ContentTemplate="{StaticResource WorkspacesTemplate}" Header="Workspaces" Style="{StaticResource MainHCC...
Bromism asked 7/6, 2013 at 7:57

© 2022 - 2024 — McMap. All rights reserved.