Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/CS/GridDemo/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/CS/GridDemo/Modules/LiveData.SL.xaml

<local:GridDemoModule x:Class="GridDemo.LiveData" mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="800" xmlns:local="clr-namespace:GridDemo" 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:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 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">
    <local:GridDemoModule.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/GridDemo;component/ModuleResources/LiveDataTemplates.SL.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </local:GridDemoModule.Resources>
    <dxdb:DemoModuleControl SupressGroupFramePaddingInOptions="False">
        <dxdb:DemoModuleControl.OptionsContent>
            <ContentControl>
                <StackPanel Orientation="Vertical" Margin="0,0,0,12">
                    <dxe:CheckEdit x:Name="chkAllowUpdating" Margin="0,0,0,4" Content="Allow Updating" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" />
                    <dx:GroupFrame Header="Update Mode" Margin="0,0,0,12">
                        <StackPanel Orientation="Vertical">
                            <dxe:ListBoxEdit Margin="0,0,30,0" ShowBorder="False" x:Name="updateModeList" EditValueChanged="updateModeList_EditValueChanged" Background="{x:Null}">
                                <dxe:ListBoxEdit.StyleSettings>
                                    <dxe:RadioListBoxEditStyleSettings />
                                </dxe:ListBoxEdit.StyleSettings>
                                <dxe:ListBoxEdit.Items>
                                    <sys:String>Add, Remove, Update</sys:String>
                                    <sys:String>Add, Remove</sys:String>
                                    <sys:String>Update Only</sys:String>
                                </dxe:ListBoxEdit.Items>
                            </dxe:ListBoxEdit>
                        </StackPanel>
                    </dx:GroupFrame>
                    <dxdb:SliderControl Header="Max Process Count" Margin="0,0,0,12" EditValue="{Binding Path=DataContext.ProcessMaxCount, Mode=TwoWay}" Minimum="10" Maximum="1000" SmallStep="5" LargeStep="50" ValueChanged="maxCountSlider_ValueChanged" />
                    <dxdb:SliderControl Header="Update Interval" Margin="0,0,0,12" UOM="(ms)" EditValue="{Binding Path=DataContext.UpdateInterval, Mode=TwoWay}" Minimum="0" Maximum="1000" SmallStep="50" LargeStep="50" />

                    <dx:GroupFrame Header="Animation options">
                        <StackPanel>
                            <dxe:CheckEdit Name="memoryUsageCheckBox" IsChecked="True" Margin="0,0,0,4" Content="Memory Usage animation" />
                            <dxe:CheckEdit Name="cpuUsageCheckBox" IsChecked="True" Margin="0,0,0,4" Content="CPU Usage animation" />
                            <dxe:CheckEdit Name="newRowCheckBox" IsChecked="True" Margin="0,0,0,4" Content="New row animation" />
                            <dxe:CheckEdit Name="deleteRowCheckBox" IsChecked="True" Margin="0,0,0,0" Content="Delete row animation" />
                        </StackPanel>
                    </dx:GroupFrame>
                </StackPanel>
            </ContentControl>
        </dxdb:DemoModuleControl.OptionsContent>
        <dxg:GridControl Name="grid" Grid.Column="0" CustomUnboundColumnData="grid_CustomUnboundColumnData" DesignTimeDataObjectType="local:ProcessInfo">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="PID" Width="50" AllowResizing="False" FixedWidth="True" />
                <dxg:GridColumn FieldName="Name" Width="100" FixedWidth="True" />
                <dxg:GridColumn FieldName="MemoryUsage" CellTemplate="{StaticResource memUsageTemplate}" />
                <dxg:GridColumn FieldName="CpuUsage" CellTemplate="{StaticResource progressTemplate}" />

                <dxg:GridColumn FieldName="AnimationElement" UnboundType="Object" Visible="False" ShowInColumnChooser="False" AllowColumnFiltering="False" />
            </dxg:GridControl.Columns>
            <dxg:GridControl.TotalSummary>
                <dxg:GridSummaryItem FieldName="PID" SummaryType="Count" DisplayFormat="Process Count = {0}" Alignment="Right" />
                <dxg:GridSummaryItem FieldName="MemoryUsage" SummaryType="Sum" DisplayFormat="Total Memory Usage = {0} K" Alignment="Left" />
            </dxg:GridControl.TotalSummary>
            <dxg:GridControl.GroupSummary>
                <dxg:GridSummaryItem FieldName="PID" SummaryType="Count" />
                <dxg:GridSummaryItem FieldName="MemoryUsage" SummaryType="Sum" />
            </dxg:GridControl.GroupSummary>
            <dxg:GridControl.View>
                <dxg:TableView NavigationStyle="Row" RowMinHeight="0" AutoWidth="True" Name="view" ShowFixedTotalSummary="True" DataRowTemplate="{StaticResource rowTemplate}" UseAnimationWhenExpanding="False" />
            </dxg:GridControl.View>
        </dxg:GridControl>
    </dxdb:DemoModuleControl>
</local:GridDemoModule>