datatemplate Questions

3

I'm trying to build a ContentControl-derived control (let's call it MyContentControl) that will have its ControlTemplate set by an instance of a DataTemplateSelector-derived type (let's call it MyT...
Underachieve asked 17/7, 2009 at 7:19

1

Solved

We're writing a very specialized ItemsControl which actually has three ContentPresenter's per 'row', each bound to a different object (think poor-man's grid) instead of the more common one, like a ...

3

Solved

I am trying to create a DataTemplate for mapping a simple data type with a corresponding view as follows: <DataTemplate DataType="{x:Type src:Person}"> <TextBox Text="{Binding Name}"/&gt...
Predominant asked 23/9, 2011 at 4:0

1

Solved

I have a resource dictionary: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="wpfUI2.MainWi...
Gemini asked 7/9, 2011 at 7:4

2

Solved

I have a WPF button defined like this: <Button Style="{StaticResource RevertButtonStyle}" /> Here is how the style looks: <Style x:Key="RevertButtonStyle" TargetType="{x:Type Button}"&...
Breadboard asked 30/8, 2011 at 22:53

2

Solved

I'm trying to implement the code below in my WPF project in order to generate DataTemplates on the fly for a DataGrid with dynamic columns. I found the code on StackOverflow here public DataTempla...
Phox asked 24/8, 2011 at 5:42

1

Solved

Is this possible? I have a ListView and I want to create a template for the columns, so that each column that I mark as a 'cellTextBox' displays with a textbox in it (and also calls the TextBox_Lo...
Disbelieve asked 24/8, 2011 at 0:20

2

Solved

How do people find the default templates of .NET controls when they can't use Expression Blend? So far, when I needed the templates for WPF controls I went to the WPF project page on Codeplex, bro...
Dirichlet asked 22/8, 2011 at 6:4

3

Solved

I have a list of Games which just has an ID, a Date, and a Time. I am setting this list as the DataContext. I then have a DataTemplate for these games that is: <DataTemplate DataType="{x:Type...
Paragraph asked 19/8, 2011 at 22:8

1

Solved

I wrote a snippet to create a own DataTemplate by c# code. And i add it to datagrid column's editing template. When i called object templateContent = tc.CellTemplate.LoadContent ( );, the applicati...

2

Solved

In my Silverlight 4 application, I have a ContentControl with its ContentTemplate property bound to a property in the data context. That works fine. However, the content of the template once render...
Hit asked 13/7, 2010 at 18:46

5

Solved

I have not been able to find a clean solution to the following problem even though there are a few related questions already on SO. If I have a data template that is being used multiple times, for...
Protomorphic asked 10/8, 2010 at 15:27

3

'ContentTemplate' is a DataTemplate that displays an object which has a member 'FooList' (an ObservableCollection). <DataTemplate x:Key="ContentTemplate"> <ListBox ItemsSource="{Binding ...
Yorker asked 28/7, 2010 at 23:24

2

Solved

I have a UserControl that has a custom DependencyProperty. When I use the UserControl from inside a DataTemplate, I cannot set the value of the DependencyProperty. If I use the UserControl directly...
Copyread asked 17/8, 2010 at 21:11

1

Solved

I've got the following.. <ComboBox Grid.Row="2" Grid.Column="2" Grid.RowSpan="2" ItemsSource="{Binding ShipperAddresses}" Text="{Binding ShipperAddress}" Margin="85,2,0,2"> <ComboBox.Ite...
Bushman asked 7/6, 2011 at 4:23

1

Solved

I've been googling this for the last 2 days and cant get anywhere, I just cant do anything to any control in a datatemplate of a tabcontrol. First off, the code: private void Window_Loaded(objec...
Upholster asked 3/6, 2011 at 20:27

2

Solved

This is XAML: <Window.Resources> <DataTemplate x:Key="Temp"> <DockPanel Width="Auto" Background="White" LastChildFill="False"> <TextBox Name="txtBox" TextWrapping="Wrap" ...
Ninnyhammer asked 3/6, 2011 at 15:53

1

Solved

How to bind textbox text property, within datatemplate, to ContentControl Content property? (Without bindng via ElementName) This is my code( that doesn't work): <Window.Resources> <Dat...
Repro asked 2/6, 2011 at 11:33

1

Solved

Working on a WPF application using the MVVM structure. My Window displays a menu and the current ViewModel. On one of the Menu's MenuItems, I want to list some Commands found in the current ViewMo...
Clinkscales asked 27/5, 2011 at 15:25

1

Solved

I've seen a few other Silverlight 'vs' questions around, but couldn't find any for this particular match-up. I'm trying to define the way in which my objects bound to a ListBox will display. I've ...
Malan asked 12/5, 2011 at 13:1

2

Is it possible to have DataTemplate composition or inheritance (similar to "BasedOn" in Styles)? There are 2 instances where I need that. For inherited classes: I have a base class with several i...
Meltage asked 14/12, 2010 at 20:0

1

Solved

Possible Duplicate: Datatemplate inheritance I have several data types that are not subclasses, nor do they share an interface, but they do have common properties that I want to displ...
Zilvia asked 6/5, 2011 at 23:49

2

I am trying to do something very simple. I have a ToggleButton.IsChecked property bound to a bool. I want the background to toggle between red(false) and green(true). But for some reason it seems t...
Jinny asked 5/1, 2009 at 13:40

1

Solved

I have a ListView which layout looks like a Windows Explorer view (icon + some details), bound to a list somewhere in the ViewModel. My aim here is to be able to switch between explorer view or cl...
Letters asked 18/4, 2011 at 16:3

2

Solved

I have a DataTemplate: <DataTemplate x:Key="myTemplate"> ... </DataTemplate> I want to use it as the ContentTemplate of a ContentPresenter: <ContentPresenter Content="{Binding X...
Merciless asked 11/4, 2011 at 9:43

© 2022 - 2024 — McMap. All rights reserved.