<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:lng="clr-namespace:parkMonitor.language"
					x:Name="ctl"
					>
	<Style TargetType="{x:Type local:TreeListBox}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:TreeListBox}">
					<Border
							BorderBrush="{Binding BorderBrush,RelativeSource={RelativeSource TemplatedParent}}"
							BorderThickness="{Binding BorderThickness,RelativeSource={RelativeSource TemplatedParent}}"
							>
						<Grid>
							<!--标题-->
							<Grid Margin="0" VerticalAlignment="Top">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="19"/>
									<ColumnDefinition Width="{Binding grdLenName,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" MinWidth="50"/>
									<ColumnDefinition Width="{Binding grdLenValue,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" MinWidth="50" />
								</Grid.ColumnDefinitions>
								<Label Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="0,0,2,0" BorderBrush="#e4e4e4" Foreground="#fff" FontWeight="Bold" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="{lng:LngBind name}"/>
								<Label Grid.Column="2" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="#fff" FontWeight="Bold" Content="{lng:LngBind info}"/>
								<GridSplitter Grid.Column="1" Width="3" Background="Transparent"/>
							</Grid>

							<!--TreeView-->
							<TreeView Margin="0,30,0,0" Background="Transparent" BorderThickness="0" Foreground="#fff" VirtualizingPanel.IsVirtualizing="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding ItemsSource,RelativeSource={RelativeSource TemplatedParent}}">
								<TreeView.Resources>
									<SolidColorBrush x:Key="coSltText">#222222</SolidColorBrush>
								</TreeView.Resources>

								<TreeView.ItemContainerStyle>
									<Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemImageStyle}">
										<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
										<Setter Property="IsExpanded" Value="True"/>
										<Setter Property="ItemsPanel">
											<Setter.Value>
												<ItemsPanelTemplate>
													<VirtualizingStackPanel/>
												</ItemsPanelTemplate>
											</Setter.Value>
										</Setter>
										<Style.Resources>
											<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#50dae3"/>
											<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#6ceff7"/>
											<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#50dae3"/>
										</Style.Resources>
									</Style>
								</TreeView.ItemContainerStyle>

								<TreeView.ItemTemplate>
									<HierarchicalDataTemplate ItemsSource="{Binding lstData}">
										<!--一级样式-->
										<Grid Name="grdBox">
											<Label FontWeight="Bold" Padding="2" FontSize="11" Content="{Binding Name}" Name="lblName">
												<Label.Style>
													<Style TargetType="Label">
														<Setter Property="Foreground" Value="#fff"/>
													</Style>
												</Label.Style>
											</Label>
										</Grid>

										<HierarchicalDataTemplate.Triggers>
											<Trigger Property="IsMouseOver" Value="True">
												<Setter Property="Background" TargetName="grdBox"  Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
												<Setter Property="Foreground" TargetName="lblName" Value="{StaticResource coSltText}"/>
											</Trigger>
										</HierarchicalDataTemplate.Triggers>

										<HierarchicalDataTemplate.ItemContainerStyle>
											<Style TargetType="TreeViewItem">
												<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
												<Setter Property="Template">
													<Setter.Value>
														<ControlTemplate>
															<!--二级样式-->
															<Grid>
																<Grid Visibility="Hidden">
																	<Grid.ColumnDefinitions>
																		<ColumnDefinition Width="15"/>
																		<ColumnDefinition Width="{Binding grdLenName,RelativeSource={RelativeSource AncestorType=local:TreeListBox},Mode=OneWay}"/>
																		<ColumnDefinition Width="{Binding grdLenValue,RelativeSource={RelativeSource AncestorType=local:TreeListBox},Mode=OneWay}"/>
																	</Grid.ColumnDefinitions>
																	<Grid Grid.Column="1" x:Name="helpGridName"/>
																	<Grid Grid.Column="2" x:Name="helpGridData"/>
																</Grid>

																<Grid Background="Transparent" HorizontalAlignment="Left" Name="grdBox">
																	<Grid.ColumnDefinitions>
																		<ColumnDefinition Width="15"/>
																		<ColumnDefinition Width="{Binding grdLenName,RelativeSource={RelativeSource AncestorType=local:TreeListBox},Mode=OneWay}"/>
																		<ColumnDefinition Width="{Binding grdLenValue,RelativeSource={RelativeSource AncestorType=local:TreeListBox},Mode=OneWay}"/>
																	</Grid.ColumnDefinitions>

																	<local:AlarmEllipse AlarmStatus="{Binding AlarmStatus}"/>
																	<Label Grid.Column="1" Foreground="#fff" FontSize="11" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Width="{Binding ActualWidth,ElementName=helpGridName}" Content="{Binding Name}" Name="lblName"/>
																	<Label Grid.Column="2" Foreground="#fff" FontSize="11" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" Width="{Binding ActualWidth,ElementName=helpGridData}" Content="{Binding ShortInfo}" Name="lblInfo"/>
																	<Grid.Style>
																		<Style TargetType="Grid">
																			<Setter Property="Background" Value="Transparent"/>
																		</Style>
																	</Grid.Style>
																</Grid>
															</Grid>
															<ControlTemplate.Triggers>
																<Trigger Property="TreeViewItem.IsSelected" Value="True">
																	<Setter Property="Background" TargetName="grdBox" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
																	<Setter Property="Foreground" TargetName="lblName" Value="{StaticResource coSltText}"/>
																	<Setter Property="Foreground" TargetName="lblInfo" Value="{StaticResource coSltText}"/>
																</Trigger>
																<Trigger Property="IsMouseOver" Value="True">
																	<Setter Property="Background" TargetName="grdBox" Value="#6ceff7"/>
																	<Setter Property="Foreground" TargetName="lblName" Value="{StaticResource coSltText}"/>
																	<Setter Property="Foreground" TargetName="lblInfo" Value="{StaticResource coSltText}"/>
																</Trigger>

															</ControlTemplate.Triggers>
														</ControlTemplate>
													</Setter.Value>
												</Setter>
											</Style>
										</HierarchicalDataTemplate.ItemContainerStyle>

										<HierarchicalDataTemplate.ItemTemplate>
											<HierarchicalDataTemplate ItemsSource="{x:Null}"/>
										</HierarchicalDataTemplate.ItemTemplate>
									</HierarchicalDataTemplate>
								</TreeView.ItemTemplate>
							</TreeView>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>