<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">
	
	<!--ImageList Device TreeItem-->
	<ControlTemplate x:Key="ImageListDevTreeItem" TargetType="{x:Type TreeViewItem}">
		<Grid Background="Transparent" Name="grdBox">
			<supUI:BehaviorBox.List>
				<view:ItemsControlSelectBehavior/>
			</supUI:BehaviorBox.List>
			
			<Grid Margin="3">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="40" />
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>

				<Grid Margin="3,-10,3,3" VerticalAlignment="Center" Height="{Binding ActualWidth,RelativeSource={RelativeSource Self}}" Name="grdImg">
					<Image Source="{local:DevImgBind ImgType}" AllowDrop="True"/>
				</Grid>
				<Label Padding="0" Foreground="#fff" FontSize="10" Margin="0,35,0,0" VerticalAlignment="Center" Content="{Binding ShortName}" Name="lblTitle"/>
				
				<ListBox Grid.Column="1" MinHeight="58" Foreground="#fff" Background="Transparent" BorderThickness="0" Padding="0" VerticalAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding LstItem}" Name="lstItem">
					<ListBox.ItemContainerStyle>
						<Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemWin7}">
							<Style.Resources>
								<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
								<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>
								<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent"/>
							</Style.Resources>
							<Style.Triggers>
								<Trigger Property="IsKeyboardFocusWithin" Value="true">
									<Setter Property="IsSelected" Value="true" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</ListBox.ItemContainerStyle>
					<ListBox.ItemTemplate>
						<DataTemplate>
							<Grid Height="22" Background="Transparent">
								<supUI:TextBoxLabel
									Margin="0,0,0,3"
									FontSize="11" Height="18" Width="120" IsReadOnly="True"
									ContentColor="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBox}}"
									Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBox}}"
									BorderBrush="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBox}}"
									CaretBrush="{Binding Foreground,RelativeSource={RelativeSource AncestorType=ListBox}}"
									LeftWidth="{Binding LeftWidth}"
									Text="{Binding ShortData,UpdateSourceTrigger=PropertyChanged}"
									Content="{Binding ShortName}"/>
							</Grid>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
			</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"/>
				<Setter Property="Foreground" TargetName="lstItem" Value="#000"/>
				<Setter Property="Foreground" TargetName="lblTitle" Value="#000"/>
			</DataTrigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
</ResourceDictionary>