aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.xaml
blob: b0f3cf085d6a1f6e6cd5d5bb4ccdea3d71c3330e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Tango.FSE.Common.Controls">

    <Style TargetType="{x:Type local:MachineIcon}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:MachineIcon}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Image RenderOptions.BitmapScalingMode="Fant">
                            <Image.Style>
                                <Style TargetType="Image">
                                    <Setter Property="Source" Value="{StaticResource FSE_Machine_Small}"></Setter>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding MachineType}" Value="1">
                                            <Setter Property="Source" Value="{StaticResource FSE_Machine_Eureka_Small}"></Setter>        
                                        </DataTrigger>
                                        <DataTrigger Binding="{Binding MachineType}" Value="2">
                                            <Setter Property="Source" Value="{StaticResource FSE_Machine_X1_Small}"></Setter>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Image.Style>
                        </Image>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>