<UserControl x:Class="Artemis.UI.Screens.SurfaceEditor.Visualization.ListDeviceView"
             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:Artemis.UI.Screens.SurfaceEditor.Visualization"
             xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
             xmlns:s="https://github.com/canton7/Stylet"
             mc:Ignorable="d"
             d:DesignHeight="450" d:DesignWidth="800"
             d:DataContext="{d:DesignInstance {x:Type local:ListDeviceViewModel}}">
    <UserControl.Resources>
        <shared:SKColorToColorConverter x:Key="SKColorToColorConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <shared:DeviceVisualizer Device="{Binding Device}" Width="30" Height="30" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" />
        <StackPanel Grid.Column="1" VerticalAlignment="Center">
            <TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Model}" />
            <TextBlock Text="{Binding Device.RgbDevice.DeviceInfo.Manufacturer}" Foreground="{DynamicResource MaterialDesignBodyLight}" />
        </StackPanel>
        <Ellipse Grid.Column="2"
                 ToolTip="This is the current random device color"
                 Width="20"
                 Height="20"
                 Stroke="{DynamicResource MaterialDesignDivider}"
                 StrokeThickness="1"
                 Visibility="{Binding Parent.ColorDevices, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
            <Ellipse.Fill>
                <SolidColorBrush Color="{Binding Color, Converter={StaticResource SKColorToColorConverter}}" />
            </Ellipse.Fill>
        </Ellipse>
    </Grid>
</UserControl>