datatemplate Questions
1
Solved
I'm simplyfying this log viewer. It works mostly as expected, but somehow the column lengths don't share the same size.
Here is my code:
<Window.Resources>
<local:IsGreaterThanConverte...
Arlenaarlene asked 28/2, 2019 at 9:40
4
Solved
I have a generic control which displays an editor based on the type property inside a ViewModel. Currently it's implemented using Control, ControlTemplate and DataTrigger like this -
<Control
x...
Bozen asked 19/1, 2012 at 12:29
3
Solved
I have code as this one:
<ListBox ItemsSource="{Binding Items}">
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type local:MyViewModel}">
<!-- xaml is typed here direct...
Afghan asked 27/7, 2016 at 10:27
4
Solved
Using WPF, I have a ListBox control with a DataTemplate inside it. The relevant XAML code is shown below:
<ListBox Name="_todoList" Grid.Row="1" BorderThickness="2"
Drop="todoList_Drop" AllowD...
Homorganic asked 18/1, 2010 at 20:18
5
I have image (PNG) files used by my GridView as part of its DataTemplate. If I try to delete a specific object row in my GridView, I would delete the related image file for that row as well. The im...
Misapprehension asked 5/12, 2012 at 7:44
1
I have a simple question. I have two datatemplates defined on my Xamarin Forms page. I want to swap one in for the other when a button is pressed. I know with a ListView I can use the ItemTemplate ...
Frigate asked 1/6, 2017 at 15:33
2
Is there a way to build a DataTemplate without using the deprecated FrameworkElementFactory or the XamlReader.Load method of string interpretation to code (related question) or (another related)?
...
Correlate asked 28/5, 2018 at 18:11
6
Solved
The default DataTemplate in a wpf application displays the result of the .ToString() method. I'm developing an application where the default DataTemplate should display nothing.
I've tried:
<...
Suggestible asked 2/4, 2009 at 14:3
1
Solved
Example:
<ListBox Name="List"
ItemsSource="{Binding Items}"
SelectedIndex="{Binding SelectedIndex}">
<ListBox.ItemTemplate>
<DataTemplate>
<DockPanel >
<Button ...
Torpor asked 20/2, 2018 at 21:2
2
Solved
When I put a DataTemplate in a <Page.Resources> section, it inherits the DataContext of the Page when editing bindings inside the designer. However at run-time the DataTemplate is being used ...
Hecatomb asked 19/6, 2013 at 9:47
1
Solved
I want to display dummy data in the design window of a WPF GridView and found a similar example: Answer: Design time data for datatemplate in xaml - Stack Overflow
I created a new WPF App (.NET F...
Severalty asked 31/8, 2017 at 21:11
8
Solved
I have a ListBox DataTemplate in WPF. I want one item to be tight against the left side of the ListBox and another item to be tight against the right side, but I can't figure out how to do this.
S...
Congressional asked 25/9, 2008 at 19:18
1
Solved
Is there a way to show error message in AdornedElementPlaceholder while verifiying PasswordBox.
I have something like this:
<ControlTemplate x:Key="DefaultErrorTemplate">
<StackPanel Or...
Sickly asked 21/6, 2017 at 12:33
1
Solved
in my UWP app I was thinking to extract my data template into a seperate user control , i.e: <DataTemplate><local:CustomTemplate/></DataTemplate>
and the user control ( customtemp...
Acentric asked 21/6, 2017 at 13:20
1
Solved
I have a TabControl with a single specific tab and a collection bound to a collection of VMs, using a different user control. To do this I use a CompositeCollection and DataTemplates defined in the...
Sterilize asked 9/6, 2017 at 12:29
4
Solved
Imagine that in one data template, I have a textBox, and another data template, I've got two textboxes.
According to this, in the view has a checkbox, and show each template.. is this possible?
S...
Novelty asked 22/1, 2012 at 5:12
4
Solved
I'm trying to implement ListView in UWP using Window's sample code.
<ListView.GroupStyle>
<GroupStyle >
<GroupStyle.HeaderTemplate>
<DataTemplate x:DataType="data:GroupI...
Remorseless asked 15/10, 2015 at 10:14
2
I've created a DataTemplateSelector which is initialized with a collection of known interfaces. If an item passed into the selector implements one of those interfaces, the associated data template ...
Prismatic asked 18/1, 2017 at 8:52
3
Solved
Can someone give me a quick summary of what a ViewModelLocator is, how it works, and what the pros/cons are for using it compared to DataTemplates?
I have tried finding info on Google but there se...
Goodloe asked 28/3, 2011 at 16:24
3
Solved
I would think this is possible, but the obvious way isn't working.
Currently, I'm doing this:
<ContentControl
Content="{Binding HurfView.EditedPart}">
<ContentControl.Resources>
&...
Thessalonians asked 1/8, 2009 at 19:8
3
Solved
I was reading this post and the author makes the suggestion that using DataTemplates to define a ViewModel is a lunatic's way to do it (#7). I do that all the time, is it really that bad?
<Dat...
Dorsett asked 26/5, 2011 at 11:50
0
I have performance problems and I am trying to dig the reasons.
So far I am not sure what is the problem and my next assumption it's data templating. Question: how expensive is using data-te...
Maraschino asked 11/7, 2016 at 12:52
2
Solved
I'm adding TreeViewItems manually in code behind and would like to use a DataTemplate to display them but can't figure out how to. I'm hoping to do something like this but the items are displayed a...
Gantrisin asked 23/7, 2009 at 23:24
4
Solved
I set up a ContentControl.DataTemplateSelector to my desired one.
I want that according to a command or whatever, call the ContentControl to reselect the template from the selector by either xaml o...
Infidel asked 18/1, 2010 at 11:1
1
Solved
REWRITTEN
I have an application that receives a file. This file has a large amount of editable content. This content comes in a variety of possible types (i.e. boolean checkboxes, textboxes, etc)....
Spermogonium asked 19/4, 2016 at 10:42
© 2022 - 2024 — McMap. All rights reserved.