datatemplate Questions
2
debuging this class the SelectTemplate Method is run 2 times, but why?
The first time the item is always null.
public class PersonDataTemplateSelector : DataTemplateSelector
{
public override Da...
Mousse asked 28/3, 2010 at 20:4
1
Solved
I have a enum let's say
enum MyEnum
{
FirstImage,
SecondImage,
ThirdImage,
FourthImage
};
I have binded this Enum to my combobox in XAML.
While defining an combobox I have defined an ItemTe...
Distortion asked 28/3, 2010 at 12:29
1
Solved
I'm trying to create a series of bound columns in a RadGridView, and I'm using a template to create hyperlinks in two of the columns. Here is basically what I have:
<telerik:GridViewDataColumn ...
Bronchiole asked 3/3, 2010 at 0:14
1
Solved
<ListBox.ItemTemplate>
<DataTemplate>
<Grid x:Name="grid">
<Grid.Background>
<SolidColorBrush x:Name="backgroundBrush" Color="Transparent" Opacity="0.1"/>
</Gr...
Splint asked 3/3, 2010 at 21:30
1
Solved
I'm dynamically adding WPF ComboBox-es and I want to be able to select the added ComboBoxes with the 'TAB' key. (Dynamically generate TabIndex or something)
As it actually is:
What I want:
...
Stickleback asked 22/1, 2010 at 11:13
2
Solved
<CombobBox x:Name="cbo"
Style="{StaticResource ComboStyle1}"
DisplayMemberPath="NAME"
SelectedItem="{Binding Path=NAME}"
SelectedIndex="1">
<ComboBox.ItemTemplate>
<DataTempla...
Policlinic asked 22/1, 2010 at 5:31
5
Solved
I have a data object -- a custom class called Notification -- that exposes a IsCritical property. The idea being that if a notification will expire, it has a period of validity and the user's atten...
She asked 18/8, 2009 at 14:44
2
Solved
I'm using MVVM and each View maps to a ViewModel with a convention. IE
MyApp.Views.MainWindowView
MyApp.ViewModels.MainWindowViewModel
Is there a way to remove the DataTemplate and do it in C#? wi...
Carnal asked 10/1, 2010 at 2:11
2
Solved
In a previous post, I was advised to use a DataTemplate to render a group of Buttons and Labels, and it works wonderfully. The problem is that I have several of these groups of Buttons, and I would...
Grass asked 5/1, 2010 at 15:54
4
Solved
I have a WPF Window with a view model set as its DataContext, and have a ListBox with a DataTemplate and its ItemsSource bound to the view model, like in the following example:
View model:
using ...
Transcription asked 24/12, 2009 at 20:18
1
Solved
I have a DataTemplate that I want to find using the FrameworkElement.FindResource(). To do that I need to have a key on the data template.
The problem is that x:key and assigning a data type are m...
Gliadin asked 23/12, 2009 at 15:58
1
I have a WPF Data template defined in my Windows.Resources section.
I would like to access this (really a list box on it) via the code behind. How can I do this?
I can't get what I want via an ev...
Bespoke asked 23/12, 2009 at 7:41
1
Solved
Does anyone know if and how one can disable items in a databound ListBox based on the value of a property?
Preferably I would like a DataTrigger which, when a certain property is false, disables t...
Picayune asked 1/12, 2009 at 7:26
3
Solved
Recently I'm trying to reuse some UI elements in my application. When I started programming with WPF I'm told that DataTemplate is the best way to reuse UI elements. You can define a template for y...
Scudo asked 27/11, 2009 at 9:29
2
Solved
I use a datatemplate to visualize some items in a ComboBox,
the ItemsSource is bound to an ObservableCollection.
To keep it simple, let's say I put persons into the ObservableCollection:
public c...
Selfsufficient asked 10/7, 2009 at 15:54
1
Solved
I have a ListBox showing data about employees such as name, department photo, badge number, etc. Employees may have different types such as Manager, Staff, Volunteers. I have 3 separate data templa...
Briquette asked 6/11, 2009 at 1:55
1
Solved
I have the following DataTemplate:
<DataTemplate x:Key="ColoringLabels">
<TextBlock Padding="0"
Margin="0"
Name="Username"
Text="{Binding Username}"
Foreground="Gray"
FontStyle="Ita...
Branchiopod asked 25/10, 2009 at 9:54
1
I have an ItemsControl that is databound to a ObservableCollection. I have this method in the code behind which adds a new model to the list. I would then like to scroll the new item (at the bottom...
Belsen asked 23/10, 2009 at 19:55
2
Solved
How would it be possible to choose a different datatemplate accroding the a field in the data binding source?
I would have 2 different DataTemplates
<DataTemplate x:Key="DataTemplateLabel">
...
Handyman asked 21/10, 2009 at 12:36
1
Solved
I have an ItemsControl whose for the ItemTemplate DataTemplate contains a Button. I want the Command on the button to bind to a Command on the DataContext of the ItemsControl, not the ItemTemplate....
Hitlerism asked 2/10, 2009 at 19:59
2
Solved
How can I make a Datatemplate for a ViewModel blendable (designable in expression blend). When I go to resources and try to edit the DataTemplate directly all I see on the Drawingborad is a blank r...
Permanency asked 4/9, 2009 at 7:58
1
Solved
I am trying to get access to a named TextBox (textBoxAnswer) in the code behind of my WPF Page. The trouble is, because it is part of a DataTemplate, it is not auto-generated as a private member of...
Irrawaddy asked 12/9, 2009 at 18:20
1
Solved
What's a good way to get at the controls in a DataTemplate? I've used the technique of handing the Loaded event on the control of interest as well as using VisualTreeHelper to walk the visual tree ...
Jetport asked 4/9, 2009 at 18:48
1
Solved
Is it possible to use a data template for a single item with no ListBox or other items control?
I have a datatemplate that I want to instantiate in xaml, not in a list, just within a border, and s...
Dangerfield asked 5/9, 2009 at 19:25
2
Solved
I am trying to display a single item (not contained in a collection) using a DataTemplate. Here's what I've got so far, which is displaying nothing. Replacing ItemsControl with ListBox displays an ...
Anhedral asked 18/2, 2009 at 23:4
© 2022 - 2024 — McMap. All rights reserved.