datatemplate Questions
1
Solved
I have a view defined as a DataTemplate (for an "OrderEntryViewModel") with a Menu, ContentPresenter, and Expander inside of a 3-row grid. The content of the ContentPresenter is binded to ano...
Assimilable asked 13/7, 2012 at 19:59
2
Solved
I simply wish to display the contents of some sort of list inside of a DataGrid. I am currently trying to use an ObservableCollection<> and a DataGrid, but that can change. How do I DataTempl...
Mara asked 6/7, 2012 at 19:15
1
Solved
There are questions on this already, but they don't answer my question.
For example:
<ContentControl.Resources>
<DataTemplate DataType="{x:Type Databinding:RedScreenViewModel}" >
&l...
Transmigrate asked 4/7, 2012 at 19:44
3
I have a combo box that is based on a data template the includes check boxes like such:
<ComboBox x:Name="cboComplex" Text="Select days...">
<ComboBox.ItemTemplate>
<DataTemplate...
Cedilla asked 26/2, 2010 at 17:17
2
Solved
I got an enoying problem... Maybe someone can (please!) help.
I am using a model that has and enumeration of types and a property that should hold UI models for each selected type from enumeration:...
Unbrace asked 25/5, 2012 at 8:57
3
Solved
Couldn't find an answer to this one.
I have a WPF ListView control that can contain varying number of columns. For example, it can display customer data, displaying columns Id, Name, Email etc, or...
Dry asked 24/2, 2009 at 21:43
4
I am trying to get the Items in a ListBox to span the entire width of the ListBox. I have found several posts dealing with HorizontalContentAlignment="Stretch" but I have not been able to get it to...
Readership asked 24/8, 2010 at 22:55
2
Solved
Is there a XAML only way to automatically sort the bound items (list of ViewModel object) ItemsControl based on one of the properties of the items. The ItemsControl is part of a DataTemplate. I tho...
Coyote asked 28/8, 2009 at 16:14
2
Solved
I have a very simple example: WPF form application with single form which contains a dictionary with data:
Dim dict As New Collections.Generic.Dictionary(Of String, String)
Private Sub MainWindow...
Merca asked 13/4, 2012 at 21:44
1
Solved
I have a view model called
ViewModelClass
which contains a boolean.
I have another view model which contains
ObservableCollection<ViewModelClass> m_allProjects;
Then I have this in my vie...
Midstream asked 17/4, 2012 at 12:4
1
Solved
Suppose the following XAML defined window:
<Window x:Class="LayoutTests.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/...
Worrisome asked 4/4, 2012 at 11:40
2
Solved
I am trying to create control which will take ItemsSource and InnerTemplate and will show all the items wrapped in CheckBoxes.
The control has 2 dependency properties:
public static readonly Depe...
Immediately asked 8/1, 2011 at 17:40
1
Solved
I'm using dataTemplate. This is the template:
<ItemsControl ItemsSource="{Binding RAM.Partitions}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Tex...
Kulturkampf asked 15/3, 2012 at 4:47
1
Solved
I want to use MVVM in an application where the different pages are TabItems.
For this I use an observable collection of my view models (Items) and bind it to the tabcontrols ItemSource.
For each ...
Orphanage asked 15/2, 2012 at 10:11
1
Solved
I have a confusion over TemplateBinding and TemplatedParent. I have gone through this link also
WPF TemplateBinding vs RelativeSource TemplatedParent
But my doubt is when to use TemplateBinding an...
Caligula asked 6/2, 2012 at 9:25
2
Solved
I have a general question about data templates in WPF. Let's say I have an abstract class called "Question," and various subclasses like "MathQuestion," "GeographyQuestion," etc. In some contexts, ...
Cookie asked 3/2, 2012 at 18:11
1
Here is the XAML markup:
<ScrollViewer Grid.Column="1" Grid.Row="2" HorizontalScrollBarVisibility="Disabled" Width="990">
<StackPanel Margin="50 0 0 40">
<ItemsControl x:Name="s...
Petronel asked 7/1, 2012 at 21:44
2
Solved
I have a very simple WPF application which displays a ComboBox which binds to a list of classes which represent people. Each 'Person' object has a Name string field, and a Sex enum. I would like th...
Dissected asked 5/1, 2012 at 16:49
3
Solved
I have a DataTemplate that will be a templated ListBoxItem, this DataTemplate has a
ComboBox in it which when it has focus I want the ListBoxItem that this template
represents to become selected, t...
Anticlastic asked 22/9, 2009 at 12:23
4
Solved
I have a user control that i am using inside a DataTemplate, this UserControl contains a TextBox which is binded with Value property(declared as a DependencyProperty) of my UserControl. In data tem...
Cabby asked 30/10, 2009 at 9:26
2
Solved
I have a class called item, and it contains just two properties. I will display them on the screen as buttons with a style. This question relates to how I can style the button based on the IsSelect...
Ultramicroscope asked 17/11, 2011 at 14:43
1
Solved
Why does the following implicit DataTemplate not work? Only the commented inline DataTemplate will work.
Note: If I remove both DataTemplates, I see a string representation of the ProductListView ...
Hassett asked 13/11, 2011 at 2:25
1
Solved
I'm getting this warning in Visual Studio output window when binding on a SolidColorBrush property inside a DataTemplate:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or...
Hardiman asked 28/10, 2011 at 7:13
1
Solved
I need to style the first and last items of a list view differently. To achieve that, I started working on a solution based on that answer: Use different template for last item in a WPF itemscontro...
Teasel asked 20/10, 2011 at 11:4
2
Solved
I have a listView that I construct at run-time, i.e. the columns are not known at compile-time.
I would like to apply a DataTemplate to the cells such that the TextAlignment property is TextAlignm...
Tale asked 14/6, 2011 at 20:31
© 2022 - 2024 — McMap. All rights reserved.