<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Grid.IsSharedSizeScope='True'>
    
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>

    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="5"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" SharedSizeGroup="TitleColumn" />
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Button Name="btnGetIntuneFilterUsage" Grid.Column='1' Grid.Row='0' Width="150" Padding="5,2,5,2" Content="Get Filter Usage" ToolTip="Get all Intune Filter assignment usage" />

        <StackPanel Grid.Row='2' Orientation="Horizontal" Margin="5,0,0,4" >
            <Label Content="Filter" />
            <Rectangle Style="{DynamicResource InfoIcon}" ToolTip="Filter rows" />
        </StackPanel>

        <TextBox Grid.Column='1' Grid.Row='2' Text="" Margin="5,3,0,5" Name="txtIntuneFilterUsageFilter" ToolTip="Filter items" />
  
    </Grid>

    <DataGrid Name="dgIntuneFilterUsage" Margin="0,5,0,0" Grid.Row="1"
                    AutoGenerateColumns="False"
                    SelectionMode="Single"
                    SelectionUnit="FullRow"
                    CanUserAddRows="False"
                    ItemsSource="">
        <DataGrid.Columns>
            <DataGridTextColumn Header="Filter Name" Binding="{Binding FilterName}" IsReadOnly="True" />
            <DataGridTextColumn Header="Policy Name" Binding="{Binding PolicyName}" IsReadOnly="True" />
            <DataGridTextColumn Header="Type" Binding="{Binding PayloadType, Mode=OneWay}" IsReadOnly="True" />
            <DataGridTextColumn Header="Mode" Binding="{Binding Mode}" IsReadOnly="True" />
            <DataGridTextColumn Header="Group" Binding="{Binding GroupName}" IsReadOnly="True" />
        </DataGrid.Columns>
    </DataGrid>    

    <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,0,0" >
        <Button Name="btnIntuneFilterUsageCopy" Content="Copy" MinWidth="100" Margin="0,0,5,0" ToolTip="Copy the Filter usage as a CSV to the clipboard" />
        <Button Name="btnIntuneFilterUsagesSave" Content="Save" MinWidth="100" />
    </StackPanel> 
</Grid>