<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5">
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <TabControl SelectedIndex="0" Margin="0,0,0,5">
        <TabItem Header="Options">
            <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,5,0">
                <Grid Name="grdExportProperties" VerticalAlignment="Stretch" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="10"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" >
                                    <Label Content="Output Type" />
                                    <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the targeted object type for the documentation" />
                                </StackPanel>
                    <ComboBox Name="cbDocumentationType" Margin="0,5,0,0" MinWidth="250" Grid.Column="1" HorizontalAlignment="Left" 
                                DisplayMemberPath="Name" SelectedValuePath="Value"  />

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="1">
                        <Label Content="Language" />
                        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify in what language the items should be documented. Note: All text might not be supported in other languages than english" />
                    </StackPanel>
                    <ComboBox Name="cbDocumentationLanguage" Margin="0,5,0,0" MinWidth="250" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left"
                            DisplayMemberPath="EnglishName" SelectedValuePath="Name" />

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="2">
                        <Label Content="Property separator" />
                        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify what character to use to separate properties of an item" />
                    </StackPanel>
                    <ComboBox Name="cbDocumentationPropertySeparator" Margin="0,5,0,0" Width="100" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" />

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="3">
                        <Label Content="Object separator" />
                        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify what character to use to separate objects" />
                    </StackPanel>
                    <ComboBox Name="cbDocumentationObjectSeparator" Margin="0,5,0,0" Width="100" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"
                        DisplayMemberPath="Name" SelectedValuePath="Value" />

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="7" Grid.ColumnSpan="2" Name="spDocumentFilter">
                        <Label Content="Filter" />
                        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Filter policies by name or Scope (Tag)" />
                    </StackPanel>
                    <TextBox Text="" Name="txtDocumentFilter" Padding="0,2,0,2" Grid.Row='8' Margin="5,0,0,0" Grid.ColumnSpan="2" />

                    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="9" Grid.ColumnSpan="2" Name="spDocumentFromFolder">
                        <Label Content="Source files" />
                        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Create documentation from exported files" />
                    </StackPanel>

                    <Grid Grid.Row='10' Margin="5,0,0,0" Grid.ColumnSpan="2" Name="grdDocumentFromFolder">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />  
                            <ColumnDefinition Width="5" />                              
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>                 
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>                
                        </Grid.RowDefinitions>
                        <TextBox Text="" Name="txtDocumentFromFolder" Padding="0,2,0,2" />
                        <Button Grid.Column="2" Name="browseDocumentFromFolder" Padding="5,0,5,0" Width="50" ToolTip="Browse for export folder">...</Button>
                    </Grid>

                    <Label Content="Objects to document" Grid.Row="0" Grid.Column="4" />
                    <DataGrid Name="grdDocumentObjects" Grid.Row="1" Grid.RowSpan="99" Grid.Column="4" CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White" Margin="0,0,5,0">
                        <!--
                        <DataGrid.Columns>
                            <DataGridCheckBoxColumn Header="Selected" Binding="{Binding IsSelected,UpdateSourceTrigger=PropertyChanged}" />
                            <DataGridTextColumn Header="Object Name" Binding="{Binding DisplayName}" IsReadOnly="True"/>
                        </DataGrid.Columns>
                        -->
                    </DataGrid>
                </Grid>
            </ScrollViewer>
        </TabItem>
        <TabItem Header="Output Settings" Visibility="Collapsed" Name="tabOutputSettings">
            <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,5,0">
                <Grid Grid.IsSharedSizeScope='True'>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid VerticalAlignment="Stretch" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="0">
                            <Label Content="Unconfigured text" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="If unconfigured items are included, specify what value they should have. Don't change will leave the current values as is. Some will be empty and some will be marked as 'Not configured'" />
                        </StackPanel>
                        <ComboBox Name="cbNotConifugredText" Margin="0,5,0,0" MinWidth="250" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left"
                                DisplayMemberPath="Name" SelectedValuePath="Value" />

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="1">
                            <Label Content="Skip unconfigured properties" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude properties that are empty or set to 'Not configured'" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='1' Name='chkSkipNotConfigured' VerticalAlignment="Center" IsChecked="true" />

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="2">
                            <Label Content="Skip default values" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude properties that are configured with default or unconfigured value" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='2' Name='chkSkipDefaultValues' VerticalAlignment="Center" IsChecked="true" />            

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="3">
                            <Label Content="Skip disabled properties" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude properties that are marked as disabled. If this is NOT checked, dispabled properties will still be excluded if the same EntityKey is used on an enabled property" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='3' Name='chkSkipDisabled' VerticalAlignment="Center" IsChecked="true" />            

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="4">
                            <Label Content="Output value" />
                            <Rectangle Style="{DynamicResource InfoIcon}">
                                <Rectangle.ToolTip>
                                    <TextBlock>
                                        Specifys the output value for subproperties in Administrative Template policies<LineBreak />
                                        <Bold>Value</Bold>: Documents only the value<LineBreak />
                                        <Bold>Value with label</Bold>: Documents the sub-property value with the label of the property<LineBreak />
                                        <Bold>Note</Bold>: This is only supported on Administrative Templates for the moment<LineBreak />
                                    </TextBlock>
                                </Rectangle.ToolTip>
                            </Rectangle>
                        </StackPanel>
                        <ComboBox Name="cbDocumentationValueOutputProperty" Margin="0,5,0,0" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" DisplayMemberPath="Name" SelectedValuePath="Value" />

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="5">
                            <Label Content="Set unconfigured value" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the unconfigured value if the propery is not configured and the property definition has an unconfigured value set" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='5' Name='chkSetUnconfiguredValue' VerticalAlignment="Center" IsChecked="true" />            

                        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="6">
                            <Label Content="Set default value" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Set the default value if the propery is not configured and the property definition has a default value configured" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='6' Name='chkSetDefaultValue' VerticalAlignment="Center" IsChecked="true" />            

                        <StackPanel Orientation="Horizontal" Grid.Row='7' Margin="0,5,5,0">
                            <Label Content="Document scripts" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Include scripts in the documentation" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='7' Name='chkIncludeScripts' VerticalAlignment="Center" IsChecked="true" />    

                        <StackPanel Orientation="Horizontal" Grid.Row='8' Margin="0,5,5,0">
                            <Label Content="Remove script signature" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Remove signature block from PowerShell scripts to reduce script documentation size" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='8' Name='chkExcludeScriptSignature' VerticalAlignment="Center" IsChecked="true" />    
                                    
                        <StackPanel Orientation="Horizontal" Grid.Row='9' Margin="0,5,5,0">
                            <Label Content="Skip Assignments" />
                            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Exclude assignments from the documentation" />
                        </StackPanel>
                        <CheckBox Grid.Column='1' Grid.Row='9' Name='chkExcludeAssignments' VerticalAlignment="Center" IsChecked="true" />    
                    </Grid>

                    <Label Name="lblCustomOptions" Grid.Row="1" Margin="0,10,5,0" />
                    <ContentControl Name="ccOutputCustomOptions" Grid.Row="2" Margin="0,0,5,0" />
                </Grid>
            </ScrollViewer>
        </TabItem>
        <TabItem Header="Raw Output">
            <Grid VerticalAlignment="Stretch" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <TextBox Name="txtDocumentationRawData"                 
                    ScrollViewer.HorizontalScrollBarVisibility="Auto"
                    ScrollViewer.VerticalScrollBarVisibility="Auto"
                    ScrollViewer.CanContentScroll="True"
                    IsReadOnly="True"
                    Margin="0" AcceptsReturn="True" />

                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,0,5" >
                    <Button Name="btnCopyBasic" Content="Copy Basic" MinWidth="100" Margin="0,0,5,0" ToolTip="Copy the Basic info to the clipboard"/>
                    <Button Name="btnCopySettings" Content="Copy Settings" MinWidth="100" Margin="0,0,5,0" ToolTip="Copy the Settings info to the clipboard"/>
                    <Button Name="btnCopyAll" Content="Copy All" MinWidth="100" Margin="0,0,0,0" ToolTip="Copy all info to the clipboard"/>
                </StackPanel>
            </Grid>
        </TabItem>
    </TabControl>


    <Grid Grid.Row='1' >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" >
            <Button Name="btnExportSettingsForSilentExport" Content="Save" Width='100' Margin="5,0,0,0" ToolTip="Save settings for batch job" Visibility="Collapsed"/>
        </StackPanel>

        <StackPanel Name="spDocSubMenu" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column='1'>
            <Button Name="btnClearDocumentationList" Content="Clear list" ToolTip="Clear items in the document list" Width='100' Margin="5,0,0,0" Visibility="Collapsed" />
            <Button Name="btnAddToDocumentationList" Content="Add to list" ToolTip="Add selected items to the list to document later" Width='100' Margin="5,0,0,0" Visibility="Collapsed" />
            <Button Name="btnStartDocumentation" Content="Start" ToolTip="Start docmentation" Width='100' Margin="5,0,0,0" />
            <Button Name="btnClose" Content="Close" Width='100' Margin="5,0,0,0" />
        </StackPanel>
    </Grid>

</Grid >    