Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/GridDemo.Wpf/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/GridDemo.Wpf/Modules/InplaceEditors.xaml

<local:GridDemoModule x:Class="GridDemo.InplaceEditors"
    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: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" UseGridControlWrapperAsDataContext="True">
    <local:GridDemoModule.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/GridDemo;component/ModuleResources/InplaceEditorsTemplates.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <local:DemoDataProvider x:Key="DemoDataProvider" />
            <dxg:TableView x:Key="columnView" AutoWidth="true" ShowTotalSummary="True"/>
            <dxg:CardView MinFixedSize="200" CardHeaderBinding="{Binding Path=Data.OID, RelativeSource={RelativeSource Self}}" x:Key="cardView" FixedSize="250" AllowCardResizing="True" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell"/>
        </ResourceDictionary>
    </local:GridDemoModule.Resources>
    <dxdb:DemoModuleControl SupressGroupFramePaddingInOptions="False">
        <dxdb:DemoModuleControl.OptionsTopText>
            Click a data cell and edit its value using the corresponding in-place editor.
        </dxdb:DemoModuleControl.OptionsTopText>
        <dxdb:DemoModuleControl.OptionsContent>
            <StackPanel>
                <dxe:CheckEdit IsChecked="{Binding Path=GridControl.View.AllowEditing, Mode=TwoWay}" Margin="0,0,0,12" Content="Enable Editing" />
                <dx:GroupFrame Header="Editor Show Mode" Margin="0,0,0,12">
                    <dxe:ComboBoxEdit Background="{x:Null}" x:Name="editorShowModeCombobox" IsTextEditable="False" SelectedIndex="0">
                        <sys:String>Mouse Down</sys:String>
                        <sys:String>Mouse Down On Focused Cell</sys:String>
                        <sys:String>Mouse Up</sys:String>
                        <sys:String>Mouse Up On Focused Cell</sys:String>
                    </dxe:ComboBoxEdit>
                </dx:GroupFrame>
                <dx:GroupFrame Header="Editor Button Show Mode" Margin="0,0,0,12">
                    <dxe:ComboBoxEdit Background="{x:Null}" x:Name="editorButtonShowModeListBox" IsTextEditable="False" SelectedIndex="0">
                        <sys:String>Show Only In Editor</sys:String>
                        <sys:String>Show For Focused Cell</sys:String>
                        <sys:String>Show For Focused Row</sys:String>
                        <sys:String>Show Always</sys:String>
                    </dxe:ComboBoxEdit>
                </dx:GroupFrame>
                <dx:GroupFrame Header="Boolean Editor Type" Margin="0,0,0,12">
                    <dxe:ComboBoxEdit Background="{x:Null}" x:Name="booleanColumnEditorListBox" IsTextEditable="False" SelectedIndex="0">
                        <sys:String>Check Edit</sys:String>
                        <sys:String>Text Edit</sys:String>
                        <sys:String>Combo Box Edit</sys:String>
                    </dxe:ComboBoxEdit>
                </dx:GroupFrame>
                <dx:GroupFrame Header="View Type" Margin="0,0,0,12">
                    <dxe:ListBoxEdit Background="{x:Null}" ShowBorder="False" x:Name="viewsListBox" SelectedIndex="0">
                        <dxe:ListBoxEdit.StyleSettings>
                            <dxe:RadioListBoxEditStyleSettings />
                        </dxe:ListBoxEdit.StyleSettings>
                        <dxe:ListBoxEdit.Items>
                            <sys:String>Table View</sys:String>
                            <sys:String>Card View</sys:String>
                        </dxe:ListBoxEdit.Items>
                    </dxe:ListBoxEdit>
                </dx:GroupFrame>
                <dx:GroupFrame Header="'To' column options" Margin="0,0,0,12">
                    <StackPanel>
                        <dxe:CheckEdit x:Name="autoCompleteCheckBox" Content="Auto Complete" IsChecked="True" Margin="0,0,0,4" />
                        <dxe:CheckEdit x:Name="immediatePopupCheckBox" Content="Immediate popup" IsEnabled="{Binding Path=IsChecked, ElementName=autoCompleteCheckBox}" />
                    </StackPanel>
                </dx:GroupFrame>
                <dx:GroupFrame Header="'Hours Active' column options" Margin="0,0,0,12">
                    <StackPanel>
                        <dxe:CheckEdit x:Name="alternativeDisplayTemplateCheckBox" Checked="alternativeDisplayTemplateCheckBox_Checked" Unchecked="alternativeDisplayTemplateCheckBox_Unchecked" Margin="0,0,0,4" Content="Use alternative display template" />
                        <dxe:CheckEdit x:Name="alternativeEditTemplateCheckBox" Checked="alternativeEditTemplateCheckBox_Checked" Unchecked="alternativeEditTemplateCheckBox_Unchecked" Content="Use alternative edit template" />
                    </StackPanel>
                </dx:GroupFrame>
            </StackPanel>

        </dxdb:DemoModuleControl.OptionsContent>
        <dxg:GridControl x:Name="grid" DesignTimeDataObjectType="local:OutlookData">
            <dxg:GridControl.View>
                <dxg:TableView AutoWidth="true" ShowTotalSummary="True"/>
            </dxg:GridControl.View>
            <dxg:GridControl.Columns>
                <dxg:GridColumn x:Name="colId" FieldName="OID" Header="Id" Width="50" MinWidth="30" ReadOnly="true" />
                <dxg:GridColumn x:Name="colPriority"  FieldName="Priority" SortMode="Value" Width="40" MinWidth="100" />
                <dxg:GridColumn FieldName="From" Width="100" />
                <dxg:GridColumn x:Name="colUserId" FieldName="ToId" Header="To" Width="100">
                    <dxg:GridColumn.EditSettings>
                        <dxe:ComboBoxEditSettings ValueMember="Id" DisplayMember="Name" ItemsSource="{Binding Users, Source={StaticResource DemoDataProvider}}"
                                              IsTextEditable="{Binding Path=IsChecked, Mode=TwoWay, ElementName=autoCompleteCheckBox}"
                                              AutoComplete="{Binding Path=IsChecked, Mode=TwoWay, ElementName=autoCompleteCheckBox}"
                                              ImmediatePopup="{Binding Path=IsChecked, Mode=TwoWay, ElementName=immediatePopupCheckBox}" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn FieldName="Sent" Width="110" GroupInterval="DateRange">
                    <dxg:GridColumn.EditSettings>
                        <dxe:DateEditSettings DisplayFormat="d" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn x:Name="colHoursActive" FieldName="HoursActive" Width="70" Validate="colHoursActive_Validate">
                    <dxg:GridColumn.EditSettings>
                        <dxe:TextEditSettings GetIsActivatingKey="TextEditSettings_GetIsActivatingKey"
      ProcessActivatingKey="TextEditSettings_ProcessActivatingKey"
      MaskType="Numeric"
      Mask="d"
      HorizontalContentAlignment="Center">
                        </dxe:TextEditSettings>
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn x:Name="colHasAttachment" FieldName="HasAttachment" Width="50" HeaderTemplate="{StaticResource clipTemplate}" />
            </dxg:GridControl.Columns>
            <dxg:GridControl.GroupSummary>
                <dxg:GridSummaryItem FieldName="HoursActive" SummaryType="Average" />
                <dxg:GridSummaryItem FieldName="From" SummaryType="Count" />
            </dxg:GridControl.GroupSummary>
            <dxg:GridControl.TotalSummary>
                <dxg:GridSummaryItem FieldName="From" SummaryType="Count" />
                <dxg:GridSummaryItem FieldName="HoursActive" SummaryType="Average" />
            </dxg:GridControl.TotalSummary>
        </dxg:GridControl>
    </dxdb:DemoModuleControl>
</local:GridDemoModule>