<UserControl x:Class="VIZ.Package.Module.FieldTreeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
             xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
             xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
             xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
             xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
             xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
             xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
             xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
             xmlns:local="clr-namespace:VIZ.Package.Module"
             xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
             d:DataContext="{d:DesignInstance Type=local:FieldTreeViewModel}" 
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <dxg:GridControl ItemsSource="{Binding Path=ControlObject.FieldNodes}" ShowBorder="False"
                         SelectedItem="{Binding Path=SelectedControlField,Mode=TwoWay}">
            <dxg:GridControl.Columns>
                <dxg:GridColumn Header="字段" FieldName="FieldIdentifier" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="150" AllowResizing="True"></dxg:GridColumn>
                <dxg:GridColumn Header="类型" FieldName="Type" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="100" AllowResizing="True"></dxg:GridColumn>
                <dxg:GridColumn Header="描述" FieldName="Description" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
                <dxg:GridColumn Header="值" FieldName="Value" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TreeListView AllowEditing="False" ShowIndicator="False"
                                  IsColumnMenuEnabled="False"
                                  NavigationStyle="Row" ShowVerticalLines="False"
                                  ShowBandsPanel="False"
                                  ShowTotalSummary="False"
                                  ShowFixedTotalSummary="False"
                                  ShowDragDropHint="False"
                                  ShowTargetInfoInDragDropHint="false"
                                  TreeDerivationMode="ChildNodesSelector" ChildNodesPath="Items">
                </dxg:TreeListView>
            </dxg:GridControl.View>
        </dxg:GridControl>

        <dx:WaitIndicator DeferedVisibility="{Binding IsLoading}" Content="Loading..." />
    </Grid>
</UserControl>
