<controls:ProWindow x:Class="DataExplorationWithSpatialClauses.ProWindowDefinitionQueryBuilder"
                    x:Name="ProWindowDialogWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
        xmlns:mapping="clr-namespace:ArcGIS.Desktop.Mapping.Controls;assembly=ArcGIS.Desktop.Mapping"
        mc:Ignorable="d"
        Title="Definition Query Demo" Height="1200" Width="1200"
        WindowStartupLocation="CenterOwner"
    >
    <controls:ProWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </controls:ProWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="3*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="8,8" Grid.Column="0">
            <TextBlock Text="MapMember:" Style="{DynamicResource RegularText}"/>
            <TextBlock Margin="6,0" Text="{Binding MapMemberName}" Style="{DynamicResource RegularText}"/>
        </StackPanel>
        <Border BorderBrush="{DynamicResource Esri_BorderHoverSelectedBrush}"  BorderThickness="2" Margin="2" Grid.Row="1" Grid.Column="0">
            <!-- DefinitionQueryBuilderControl is in the ArcGIS.Desktop.Mapping assembly, ArcGIS.Desktop.Mapping.Controls namespace -->
            <mapping:DefinitionQueryBuilderControl x:Name="DefinitionQueryBuilderControl"  ConfigureControl="{Binding MyConfigureControlProperties, Mode=TwoWay}" />
        </Border>
        <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal">
            <Button  Margin="6" HorizontalAlignment="Right" Style="{DynamicResource Esri_Button}" Content="Apply" Command="{Binding ApplyCommand}"
    IsEnabled="{Binding Path=IsModified, ElementName=DefinitionQueryBuilderControl}" />
            <Button  Margin="6" HorizontalAlignment="Right" Style="{DynamicResource Esri_Button}" Content="Close" Command="{Binding CmdCancel}" CommandParameter="{Binding ElementName=ProWindowDialogWin}" />
        </StackPanel>
        
        <mapping:MapControl Name="mapControl" Grid.Row="0" Grid.RowSpan="3" Grid.Column="1"  
                        ViewContent="{Binding Path=MapContent}" 
                        Camera="{Binding CameraProperty}" >
        </mapping:MapControl>
    </Grid>
</controls:ProWindow>
