Mini Kabibi Habibi
<local:GridDemoModule x:Class="GridDemo.CardTemplates"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:global="clr-namespace:System.Globalization;assembly=mscorlib"
xmlns:dxdemo="clr-namespace:GridDemo"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
xmlns:local="clr-namespace:GridDemo"
xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="800">
<local:GridDemoModule.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/GridDemo;component/Themes/generic.xaml" />
<ResourceDictionary Source="/GridDemo;component/ModuleResources/CardTemplatesResources.xaml" />
</ResourceDictionary.MergedDictionaries>
<collections:ArrayList x:Key="CardHeaderTemplates">
<sys:String>None</sys:String>
<sys:String>Full Name</sys:String>
<sys:String>Photo and Full Name</sys:String>
</collections:ArrayList>
<collections:ArrayList x:Key="EMailOptions">
<sys:String>Default</sys:String>
<sys:String>Cell Template</sys:String>
<sys:String>Row Template</sys:String>
</collections:ArrayList>
<collections:ArrayList x:Key="CardTemplates">
<sys:String>Default</sys:String>
<sys:String>Tabbed Details</sys:String>
<sys:String>Expandable Notes</sys:String>
</collections:ArrayList>
</ResourceDictionary>
</local:GridDemoModule.Resources>
<dxdb:DemoModuleControl>
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel Orientation="Vertical">
<dx:GroupFrame Header="Card Header" Margin="0,0,0,4">
<dxe:ListBoxEdit Background="{x:Null}" Name="cardHeaderTemplateListBox" SelectedIndex="1" ShowBorder="False" ItemsSource="{DynamicResource CardHeaderTemplates}" EditValueChanged="cardHeaderTemplateListBox_SelectionChanged">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings />
</dxe:ListBoxEdit.StyleSettings>
</dxe:ListBoxEdit>
</dx:GroupFrame>
<dx:GroupFrame Header="Card Contents" Margin="0,0,0,4">
<dxe:ListBoxEdit Background="{x:Null}" Name="cardTemplateListBox" ShowBorder="False" SelectedIndex="1" ItemsSource="{DynamicResource CardTemplates}" EditValueChanged="cardTemplateListBox_SelectionChanged">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings />
</dxe:ListBoxEdit.StyleSettings>
</dxe:ListBoxEdit>
</dx:GroupFrame>
<dx:GroupFrame Header="E-mail Template" Margin="0,0,0,0" Name="eMailTemplateGroupBox">
<dxe:ListBoxEdit Background="{x:Null}" IsEnabled="False" Name="eMailTemplateListBox" ShowBorder="False" SelectedIndex="1" ItemsSource="{DynamicResource EMailOptions}" EditValueChanged="eMailTemplateListBox_SelectionChanged">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings />
</dxe:ListBoxEdit.StyleSettings>
</dxe:ListBoxEdit>
</dx:GroupFrame>
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxg:GridControl Name="grid" Grid.Column="0" ItemsSource="{x:Static dxdb:NWindData.Employees}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="FirstName" />
<dxg:GridColumn FieldName="LastName" />
<dxg:GridColumn FieldName="Photo" AllowColumnFiltering="False">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ImageEdit MenuTemplate="{StaticResource {dxet:ImageEditThemeKey ResourceKey=MenuTemplate}}" Source="{Binding Path=Value}" HorizontalAlignment="Left" Margin="5" Stretch="None" ShowMenu="False" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="BirthDate" EditSettings="{dxe:DateSettings DisplayFormat=d}" />
<dxg:GridColumn FieldName="Title" Header="Position" />
<dxg:GridColumn x:Name="colEMail" FieldName="EMail" Header="E-mail" UnboundType="String" UnboundExpression="Lower([LastName])+'@devexpress.com'" CellTemplate="{DynamicResource eMailTemplateCards}" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:CardView Name="view" FixedSize="300" ShowGroupedColumns="True" NavigationStyle="Row" CardHeaderTemplate="{DynamicResource headerTemplateFullName}"
CardTemplate="{DynamicResource cardTemplate1}" MinFixedSize="200" />
</dxg:GridControl.View>
</dxg:GridControl>
</dxdb:DemoModuleControl>
</local:GridDemoModule>