<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:parkMonitor.view.util"
                    xmlns:view="clr-namespace:parkMonitor.view"
					xmlns:supUI="clr-namespace:com.superscene.ui"
					xmlns:lng="clr-namespace:parkMonitor.language">
	
	<!--Image Device TreeItem-->
	<ControlTemplate x:Key="ImageDevTreeItem" TargetType="{x:Type TreeViewItem}">
		<Grid Background="Transparent" Name="grdBox">
			<supUI:BehaviorBox.List>
				<view:ItemsControlSelectBehavior/>
			</supUI:BehaviorBox.List>
			
			<Grid Margin="3">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="30" />
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>

				<Grid Name="grdImg" Height="{Binding ActualWidth,RelativeSource={RelativeSource Self}}">
					<Image Source="{local:DevImgBind ImgType}"/>
				</Grid>
			</Grid>
		</Grid>
		<ControlTemplate.Triggers>
			<DataTrigger Binding="{Binding AlarmStatus}" Value="Normal">
				<Setter Property="Background" TargetName="grdImg" Value="Transparent"/>
			</DataTrigger>
			<DataTrigger Binding="{Binding AlarmStatus}" Value="Offline">
				<Setter Property="Background" TargetName="grdImg" Value="#8c8c8c"/>
			</DataTrigger>
			<DataTrigger Binding="{Binding AlarmStatus}" Value="Reset">
				<Setter Property="Background" TargetName="grdImg" Value="#43b9cb"/>
			</DataTrigger>
			<DataTrigger Binding="{Binding AlarmStatus}" Value="Warning">
				<Setter Property="Background" TargetName="grdImg" Value="#e5dd05"/>
			</DataTrigger>
			<DataTrigger Binding="{Binding AlarmStatus}" Value="Error">
				<Setter Property="Background" TargetName="grdImg" Value="#e42323"/>
			</DataTrigger>

			<DataTrigger Value="True">
				<DataTrigger.Binding>
					<local:OrBind>
						<Binding Path="IsMouseOver" RelativeSource="{RelativeSource Self}"/>
						<Binding Path="IsSelected" RelativeSource="{RelativeSource Self}"/>
					</local:OrBind>
				</DataTrigger.Binding>
				<Setter Property="Background" TargetName="grdBox" Value="#6ceff7"/>
			</DataTrigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
</ResourceDictionary>