Mini Kabibi Habibi
<local:GridDemoModule x:Class="GridDemo.LinqServerMode"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxgt="clr-namespace:DevExpress.Xpf.Grid.Themes;assembly=DevExpress.Xpf.Grid.v13.1"
xmlns:local="clr-namespace:GridDemo"
xmlns:controls="clr-namespace:GridDemo.Controls"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
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"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
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/LinqServerModeTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</local:GridDemoModule.Resources>
<dxdb:DemoModuleControl SupressGroupFramePaddingInOptions="False">
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel>
<dxe:CheckEdit Name="chkInstantFeedBack" IsChecked="True" Content="Enable Instant Feedback" Margin="0,0,0,12" Checked="ChangeInstantFeedBack" Unchecked="ChangeInstantFeedBack" />
<Button Name="btnConfigure" Content="Configuration..." Height="22" VerticalAlignment="Top" Margin="0,0,0,12" Click="Configure" />
<dx:GroupFrame Header="Wait Indicator Type" Margin="0,0,0,12" Visibility="{Binding IsChecked, ElementName=chkInstantFeedBack, Converter={StaticResource BooleanToVisibilityConverter}}">
<dxe:ListBoxEdit Name="waitIndicatorList" Background="{x:Null}" ShowBorder="False" Margin="0,0,30,0" SelectedItem="{Binding WaitIndicatorType, ElementName=view, Mode=OneTime}" EditValueChanged="CustomizeWaitIndicator">
<dxe:ListBoxEdit.StyleSettings>
<dxe:RadioListBoxEditStyleSettings />
</dxe:ListBoxEdit.StyleSettings>
<dxe:ListBoxEdit.Items>
<dxg:WaitIndicatorType>Default</dxg:WaitIndicatorType>
<dxg:WaitIndicatorType>Panel</dxg:WaitIndicatorType>
<dxg:WaitIndicatorType>None</dxg:WaitIndicatorType>
<sys:String>Custom</sys:String>
</dxe:ListBoxEdit.Items>
</dxe:ListBoxEdit>
</dx:GroupFrame>
<dx:LinqServerModeDataSource Name="linqServerModeDataSource" KeyExpression="OID" ElementType="controls:WpfServerSideGridTest" QueryableSource="{Binding Path=DataContext.WpfServerSideGridTests}" />
<dx:LinqInstantFeedbackDataSource Name="linqInstantFeedbackDataSource" KeyExpression="OID" QueryableSource="{Binding Path=DataContext.WpfServerSideGridTests}" />
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxg:GridControl Name="grid" DesignTimeDataObjectType="controls:WpfServerSideGridTest">
<dxg:GridControl.Columns>
<dxg:GridColumn x:Name="colid" FieldName="OID" Header="ID" Width="60" MinWidth="60" AllowGrouping="False" />
<dxg:GridColumn x:Name="colFrom" FieldName="From" GroupInterval="Alphabetical" GroupIndex="1" />
<dxg:GridColumn x:Name="colSubject" FieldName="Subject" Width="300" />
<dxg:GridColumn x:Name="colSent" FieldName="Sent" Width="80" GroupInterval="DateMonth" EditSettings="{dxe:DateSettings DisplayFormat=d}" />
<dxg:GridColumn x:Name="colSize" FieldName="Size" Width="60" />
<dxg:GridColumn x:Name="colHasAttachment" FieldName="HasAttachment" Width="35" HorizontalHeaderContentAlignment="Center" HeaderTemplate="{StaticResource clipTemplate}" ToolTip="Has Attachment">
<dxg:GridColumn.EditSettings>
<dxe:CheckEditSettings />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn x:Name="colDaysActive" FieldName="DaysActive" Width="45" UnboundType="Integer" AllowUnboundExpressionEditor="True"
UnboundExpression="DateDiffDay([Sent], Now())" HeaderTemplate="{StaticResource daysActiveTemplate}" />
</dxg:GridControl.Columns>
<dxg:GridControl.GroupSummary>
<dxg:GridSummaryItem FieldName="Size" SummaryType="Sum">
</dxg:GridSummaryItem>
<dxg:GridSummaryItem FieldName="From" SummaryType="Count" />
</dxg:GridControl.GroupSummary>
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem FieldName="From" SummaryType="Count" />
</dxg:GridControl.TotalSummary>
<dxg:GridControl.View>
<dxg:TableView x:Name="view" WaitIndicatorType="Panel" ShowTotalSummary="True" AutoWidth="True" AllowEditing="False"
ShowAutoFilterRow="True" ShowGroupedColumns="True" AllowHorizontalScrollingVirtualization="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<i:Interaction.Triggers>
<i:EventTrigger EventName="BeforeModuleDisappear">
<i:InvokeCommandAction Command="{Binding ElementName=linqInstantFeedbackDataSource, Path=DisposeCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</dxdb:DemoModuleControl>
</local:GridDemoModule>