datatemplate Questions
2
How would I go about implementing this?
Let's say this is my model:
public interface IAnimal
{
string Name { get; }
}
public class Fish : IAnimal
{
public string Name { get; set; }
public int ...
Stevenage asked 5/9, 2015 at 14:32
5
Solved
Which one is better from performance view user control or custom control?
Right now I am using user control and In a specific scenario, I am creating around 200(approx.) different instances of this...
Petulah asked 25/3, 2010 at 17:12
2
Solved
I have a ComboBox with fairly complex template for individual items, which includes two images and several lines of text:
However, the selected item in the ComboBox itself doesn't display correc...
Ukase asked 26/11, 2011 at 14:30
2
Solved
I was wondering how people handle a ListBox control that has no items? e.g. I want to bind a list of search results but if no results are found i would like to display "No results found".
The way...
Secretion asked 31/3, 2009 at 3:11
1
Solved
I've declared the following types:
public interface ITest { }
public class ClassOne : ITest { }
public class ClassTwo : ITest { }
In my viewmodel I'm declaring and initializing the following col...
Longitudinal asked 18/2, 2016 at 21:51
2
Solved
I have a ListBox whose ItemTemplate looks like this:
<DataTemplate DataType="local:Column">
<utils:EditableTextBlock x:Name="editableTextBlock" Text="{Binding Name, Mode=TwoWay}"/>
&l...
Stopped asked 4/1, 2016 at 13:13
3
Solved
I have a FlipView control with the DataTemplate defined as below:
<FlipView x:Name="FlipView5Horizontal" Width="480" Height="270" BorderBrush="Black" BorderThickness="1" Style="{StaticResource ...
Aluminum asked 21/12, 2015 at 12:43
2
Solved
I have a WPF Control template for the MenuItem type:
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Background"
Value="Transparent" />
<Setter Property="Cursor"
Value=...
Flak asked 6/11, 2015 at 12:19
4
Solved
I have this markup extension
public class NullableExtension : TypeExtension
{
public NullableExtension() {
}
public NullableExtension( string type )
: base(type) {
}
public NullableExtensi...
Demirep asked 13/12, 2009 at 20:11
1
Solved
<local:LabelTemp x:Key="labelTemplate"/>
<DataTemplate x:Key="labelTemp">
<TextBlock Text="{Binding Converter={StaticResource labelTemplate},Path=Item.Items}"/>
</DataTempla...
Ween asked 2/11, 2015 at 15:58
2
What is the difference between
ControlTemplate
DataTemplate
HierarchalDataTemplate
ItemTemplate
Cota asked 22/9, 2012 at 8:41
5
Solved
I've got a set of ViewModels that I'm binding to the ItemsSource property of a TabControl. Let's call those ViewModels AViewModel, BViewModel, and CViewModel. Each one of those needs to have a diff...
Bowker asked 28/8, 2009 at 16:30
1
Solved
Is there a way to avoid generation of ContentPresenter that ItemsControl wraps my items in? My ItemsControl is bound to a VM property and I'm using a DataTemplate in my ItemControl's Resources (wit...
Commeasure asked 3/8, 2015 at 13:17
1
Solved
I have a problem while trying to bind 2 or more Comboboxes SelectedValue to a property, that is null.
Only 1 of the comboboxes bound to this property will show the real value.
Below is my Xaml wh...
Ethology asked 24/6, 2015 at 0:33
2
Solved
I have in my application a data template that has a few buttons.
I want those buttons' even handler to be fired in the current page (I am using this template in many pages) rather than in the Appli...
Selfexecuting asked 30/3, 2009 at 13:45
2
Solved
I have a ToolBar with 3 DataTemplates for my Items:
<ToolBar ItemsSource="{Binding ContextActions}" Background="Transparent" ToolBarTray.IsLocked="True">
<ToolBar.Resources>
<Dat...
Sprout asked 8/6, 2015 at 14:30
1
I already searched a lot of sites on the net, but didn't find any solution. The statement is, that there is no performance difference between a UserControl and a CustomControl.
But I have the foll...
Fie asked 30/5, 2013 at 23:59
2
Solved
I have a ListView which has a data template based on a grid. The xaml is as follows:
<ListView ItemsSource="{Binding SomeItemSource}" HorizontalAlignment="Stretch" Height="281">
<ListVie...
Waechter asked 30/5, 2013 at 9:39
2
Solved
I have a item control which is bound to Tasks. Each task has task state. I have defined different data templates for each task state, and also data template selector.
Problem is that I am not able...
Elaboration asked 30/10, 2012 at 10:14
1
Solved
So I have this XAML as my UserControl. I have an Expander for each property I need to use. In the Header property of the Expander I've done binding to a DataTemplate to use a Image Button. What I n...
Demisec asked 14/4, 2015 at 13:19
3
Solved
I'm trying to work out the best way to couple my Views and ViewModels in MVVM and I've settled on the ViewModel-first approach using typed DataTemplates, as described in this article and in this an...
Blackface asked 4/3, 2012 at 0:12
1
Solved
I'm trying to design the DataTemplate for my ItemsControl and I need some mock data to populate the template. I read using d:DataContext is enough so that I don't have to create a mock class. How c...
Supertax asked 17/1, 2015 at 21:32
5
Solved
Consider the following collection.
True
False
False
False
True
True
False
False
I want to display it in a structured way, say, in a TreeView. I want to be able to draw borders around entire gro...
Parang asked 25/9, 2009 at 15:40
4
Please tell me how to access flipview control inside Hubsection *DataTemplate*
Shebeen asked 2/3, 2014 at 10:53
2
Solved
I have a List with a DataTemplate that shows the text and a "x" button next to it. I want the "X" btn to be shown at the extreme right, so they all appear in same place. The XML I use is :
<Lis...
Compass asked 26/5, 2012 at 11:0
© 2022 - 2024 — McMap. All rights reserved.