<UserControl x:Class="CustomControls.DiodeControl"
             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:CustomControls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="Image">
            <Setter Property="Source" Value="/VSview;component/View/Resources/Images/gray.png"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding RedLight, FallbackValue=false}" Value="true">
                    <Setter Property="Source" Value="/VSview;component/View/Resources/Images/red.png"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding GreenLight, FallbackValue=false}" Value="true">
                    <Setter Property="Source" Value="/VSview;component/View/Resources/Images/green.png"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding GrayLight, FallbackValue=false}" Value="true">
                    <Setter Property="Source" Value="/VSview;component/View/Resources/Images/gray.png"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Image />
    </Grid>
</UserControl>
