<UserControl x:Class="Ion.Sdk.DemoApp.Views.InstrumentInformation"
             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:local="clr-namespace:Ion.Sdk.DemoApp.Views"
             x:Name="View"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="300">
    <Grid x:Name="Root">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*"
                           MaxHeight="400" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.Row="0"
                Background="{StaticResource Brush.Background}" />
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Viewbox Stretch="Uniform"
                     Height="13"
                     Margin="15 0 0 0" SnapsToDevicePixels="True">
                <Path Stretch="Uniform"
                      Data="{StaticResource Geometry.Info}"
                      Fill="{StaticResource Brush.Accent.Strong}" />
            </Viewbox>
            <TextBlock Grid.Column="1"
                       Text="Instrument information"
                       Style="{StaticResource TextBlock.Content}"
                       Margin="{StaticResource Margin.Content}"
                       Foreground="{StaticResource Brush.Accent.Strong}" />
            <Button Grid.Column="2"
                    Style="{StaticResource Button.Circle}"
                    Command="{Binding ElementName=View, Path=CloseCommand}"
                    ContentTemplate="{StaticResource Button.Template.Close}"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Right"
                    Margin="{StaticResource Margin.Button}" />
        </Grid>
        <Grid Grid.Row="1">
            <ScrollViewer Margin="1 0">
                <ItemsControl ItemsSource="{Binding Path=InstrumentProperties}"
                              Margin="10">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Label Style="{StaticResource Label.Top}"
                                       Content="{Binding Path=Key}" />
                                <TextBlock Style="{StaticResource TextBlock.Content}"
                                           Text="{Binding Path=Value}" />
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </ScrollViewer>
        </Grid>
    </Grid>
</UserControl>
