<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="grdWordOptions">
    <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="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="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>

    <Grid Grid.ColumnSpan="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </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="Output Properties" />
            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the output type. Simple will only add Value and Name for Settings. Extended will output the same as Raw Output. Use Custom to select custom properties" />
        </StackPanel>
        <ComboBox Name="cbWordDocumentationProperties" 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" Name="spWordCustomProperties">
            <Label Content="Custom Properties" />
            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Comma separated list with properties to export. The properties must match with values from Raw Data" />
        </StackPanel>
        <TextBox Text="" Name="txtWordCustomProperties" Margin="0,5,5,5" Grid.Row="1" Grid.Column="1"/>

        <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="2">
            <Label Content="Document format" />
            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the output format eg Docx or PDF" />
        </StackPanel>
        <ComboBox Name="cbWordDocumentationFormat" Margin="0,5,0,0" MinWidth="250" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"
                DisplayMemberPath="Name" SelectedValuePath="Value" />

    </Grid>

    <Grid Grid.Row="1" Grid.ColumnSpan="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </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="Output Level" />
            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the output level. Full will document full value of each setting, Limited will truncate the value if more than 100 characters and Basic will only include the basic information and assignments but no settings" />
        </StackPanel>
        <ComboBox Name="cbWordDocumentationLevel" Margin="0,5,0,0" MinWidth="250" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left"
                DisplayMemberPath="Name" SelectedValuePath="Value" />
        
        <Grid Grid.Row="1" Grid.ColumnSpan="2" Name="gdWordDocumentationLimitOptions">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel Orientation="Horizontal" Margin="0,5,5,0" >
                <Label Content="Attach full value" />
                <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Attach value as a text file if exceeds the Max value length" />
            </StackPanel>
            <CheckBox Grid.Column='1' Name='chkWordDocumentationLimitAttach' VerticalAlignment="Center" IsChecked="true" />

            <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="1">
                <Label Content="Max value length" />
                <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the max sting length of the value. Value over this size will be truncated. Default is 100" />
            </StackPanel>
            <TextBox Text="" Name="txtWordDocumentationLimitMaxLength" Margin="0,5,5,5" Width="100" Grid.Row="1" HorizontalAlignment="Left"  Grid.Column="1"/>

            <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="2">
                <Label Content="Truncated value length" />
                <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the length for the truncate size. Default is same size as Max value length. Specify 0 to skip tuncated text and only include the attached value (must be enabled)" />
            </StackPanel>
            <TextBox Text="" Name="txtWordDocumentationLimitTruncateLength" Margin="0,5,5,5" Width="100" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1"/>

        </Grid>
    </Grid>

    <StackPanel Orientation="Horizontal" Margin="0,0,5,0" Grid.Row="2">
        <Label Content="Word document template" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="The document template (*.dotx) file to use for the documentation. Normal.dotx will be used if this is empty" />
    </StackPanel>
    <Grid Grid.Column='1' Grid.Row='2' Margin="0,5,5,0" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />  
            <ColumnDefinition Width="5" />                              
            <ColumnDefinition Width="Auto" />                                
        </Grid.ColumnDefinitions>                 
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>                
        </Grid.RowDefinitions>
        <TextBox Text="" Name="txtWordDocumentTemplate" />
        <Button Grid.Column="2" Name="browseWordDocumentTemplate" Padding="5,0,5,0" Width="50" ToolTip="Browse for template file">...</Button>
    </Grid>

    <StackPanel Orientation="Horizontal" Grid.Row='3' Margin="0,0,5,0">
        <Label Content="Document name" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Default value is %MyDocuments%\%Organization%-%Date%.docx. Special folders and environmentvariables can be used" />
    </StackPanel>
    <Grid Grid.Column='1' Grid.Row='3' Margin="0,5,5,0" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />  
            <ColumnDefinition Width="5" />                              
            <ColumnDefinition Width="Auto" />                                
        </Grid.ColumnDefinitions>                 
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>                
        </Grid.RowDefinitions>
        <TextBox Text="" Name="txtWordDocumentName" />
        <Button Grid.Column="2" Name="browseWordDocumentName" Padding="5,0,5,0" Width="50" ToolTip="Select output document">...</Button>    
    </Grid>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="5">
        <Label Content="Include Categories" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Add categories when available for objects" />
    </StackPanel>
    <CheckBox Grid.Column='1' Grid.Row='5' Name='chkWordAddCategories' VerticalAlignment="Center" IsChecked="true" />            

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="6">
        <Label Content="Include Sub-categories" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Add sub-categories when available for objects" />
    </StackPanel>
    <CheckBox Grid.Column='1' Grid.Row='6' Name='chkWordAddSubCategories' VerticalAlignment="Center" IsChecked="true" />

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="7">
        <Label Content="Header 1 style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style for Header 1" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='7' Name='txtWordHeader1Style' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="8">
        <Label Content="Header 2 style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style for Header 2" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='8' Name='txtWordHeader2Style' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="9">
        <Label Content="Header 3 style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style for Header 3" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='9' Name='txtWordHeader3Style' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="10">
        <Label Content="Table style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style for Tables" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='10' Name='txtWordTableStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="11">
        <Label Content="Table header row style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style of the Table header row. Default is Font size increased by 2" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='11' Name='txtWordTableHeaderStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="12">
        <Label Content="Table Category header row style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style of the Table Category row. Default is Font size increased by 2 + Italic" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='12' Name='txtWordCategoryHeaderStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="13">
        <Label Content="Table Sub-Category header row style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style of the Table Sub-Category row. Default is current font + Italic" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='13' Name='txtWordSubCategoryHeaderStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="14">
        <Label Content="Table text style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Style of the text in a table. Default is current font" />
    </StackPanel>
    <TextBox Grid.Column='2' Grid.Row='14' Name='txtWordTableTextStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="15">
        <Label Content="Table caption position" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify where the table captions should be. Above or below the table" />
    </StackPanel>
    <ComboBox Name="cbWordTableCaptionPosition" Margin="0,5,0,0" MinWidth="250" Grid.Row="15" Grid.Column="1" HorizontalAlignment="Left"
            DisplayMemberPath="Name" SelectedValuePath="Value" />

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="16">
        <Label Content="Cover Page" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Cover page to use if the template property is not specified. Ion (Dark) is used if not specified" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='16' Name='txtWordCoverPage' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="17">
        <Label Content="Title" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the title property for the document" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='17' Name='txtWordTitleProperty' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="18">
        <Label Content="Subject" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the subject property for the document" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='18' Name='txtWordSubjectProperty' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="19">
        <Label Content="Content controls" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify content control values e.g. prop1=value;prop2=value;prop3=value" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='19' Name='txtWordContentControls' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Grid.Row='20' Margin="0,0,5,0">
        <Label Content="Open document" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="This will open the document and activate Word when finished" />
    </StackPanel>
    <CheckBox Grid.Column='1' Grid.Row='20' Name='chkWordOpenDocument' VerticalAlignment="Center" IsChecked="true" />

    <StackPanel Orientation="Horizontal" Grid.Row='23' Margin="0,0,5,0">
        <Label Content="Attach Json file" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Attach the Json file to the documentation" />
    </StackPanel>
    <CheckBox Grid.Column='1' Grid.Row='23' Name='chkWordAttachJsonFile' VerticalAlignment="Center" IsChecked="false" />    

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="24">
        <Label Content="Script table style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the table style to use for scripts. Document table style will be use as default" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='24' Name='txtWordScriptTableStyle' Margin="0,5,5,5"/>

    <StackPanel Orientation="Horizontal" Margin="0,5,5,0" Grid.Row="25">
        <Label Content="Script font style" />
        <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Specify the font style to use for documenting scripts. HTML Code is used as default" />
    </StackPanel>
    <TextBox Grid.Column='1' Grid.Row='25' Name='txtWordScriptStyle' Margin="0,5,5,5"/>

</Grid>
