itemtemplateselector

LongListSelector different item template for first and last item

半腔热情 提交于 2019-12-29 08:03:42
问题 Im writing my Windows phone 8 app which uses LongListSelector to display some data. How to set different item template for first and last item in LongListSelector? Basically I just want to display same information in every item but use little different item "layout" in last and first item. 回答1: You could implement some kind of data template selector to help in determining which template to select based on index. You can start off by creating a reusable abstract TemplateSelector class. I used

Both 'ItemTemplate' and 'ItemTemplateSelector' are set; 'ItemTemplateSelector' will be ignored

别来无恙 提交于 2019-12-11 07:16:07
问题 Following this question, I have another question about TreeView . What I already have is a TreeView with HierarchicalDataTemplate , in which I can change the HierarchicalDataTemplate of level2 (like explained in the question and the answer). What I want now, is to change the look of the expander of the Treeview . For this, I have defined a ControlTemplate named ctForTreeViewItem , and I use it like this: <Window.Resources> <ControlTemplate x:Key="ctForTreeViewItem" TargetType="{x:Type

ItemTemplateSelector in WPF Datagrid with AutoGenerateColumns

浪子不回头ぞ 提交于 2019-12-10 17:32:11
问题 In our data grid we're using an ItemTemplateSelector to switch between two data templates based on the data bound to a particular cell. As the number of columns depends on the current data set we're using AutoGenerateColumns in our DataGrid . It appears that this particular combination does not work well - the template selector isn't even called. Can we use the template selector in a data grid where columns are created automatically? More specifically: Is this possible using XAML only w/o

MvvmCross : dynamic item template selection for MvxListView

久未见 提交于 2019-12-07 04:10:38
问题 If I have a view with the following MvxListView definition: <Mvx.MvxListView android:layout_marginTop="10px" android:textFilterEnabled="true" android:choiceMode="singleChoice" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textSize="20dp" local:MvxBind="ItemsSource Data; ItemClick LaunchCapabilityViewCmd" local:MvxItemTemplate="@layout/itemtemplate1" /> Instead of hard coding MvxItemTemplate to itemtemplate1, it it possible to dynamically set this based on the