<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:supUI="clr-namespace:com.superscene.ui"
					xmlns:util="clr-namespace:parkMonitor.view.util"
					xmlns:lng="clr-namespace:parkMonitor.language">
	<Style TargetType="{x:Type local:DevMenuListBox}"  >
		<Setter Property="Foreground" Value="#fff"/>
		<Setter Property="Background" Value="#4c4c4c"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:DevMenuListBox}">
					<Grid Name="grdBox">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="20"/>
							<ColumnDefinition Width="*"/>
						</Grid.ColumnDefinitions>

						<Grid Grid.Column="0" Cursor="Hand" Background="Transparent" supUI:XEvtTrigger.MouseLeftButtonUp="{Binding CmdScale, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:DevMenuListBox}}}">
							<Grid.RowDefinitions>
								<RowDefinition Height="15"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<!--btn To Small-->
							<Grid RenderTransformOrigin="0.5, 0.5" Name="grdScale">
								<Path Stroke="#fff" Margin="0.5,-0.5,0,0" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center">

									<Path.Data>
										<PathGeometry>
											<PathFigure StartPoint="0,8">
												<PolyLineSegment Points="8,3 8,13 0,8"></PolyLineSegment>
											</PathFigure>
										</PathGeometry>
									</Path.Data>
								</Path>
							</Grid>
							<!--title-->
							<TextBlock Grid.Row="1" Foreground="#fff" TextWrapping="Wrap" FontSize="11" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Center" Text="{Binding Content,RelativeSource={RelativeSource TemplatedParent}}" ToolTip="{Binding Content,RelativeSource={RelativeSource TemplatedParent}}" ToolTipService.InitialShowDelay="0"/>
						</Grid>

						<Grid Grid.Column="1" Name="grdData">
							<util:ImageMenuItem Visibility="Collapsed" Margin="0,0,5,0" MouseOverColor="#808080" Content="{lng:LngBind noDev}" Source="/parkMonitor;component/resource/image/menu/noDev.png" x:Name="imgNoDev"/>
						
							<!--data-->
							<ListBox Margin="5,5,0,5" Padding="0"  Background="Transparent" ItemsSource="{Binding ItemsSource,RelativeSource={RelativeSource TemplatedParent}}" SelectedIndex="{Binding SelectedIndex,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Name="lstItem">
								<ListBox.ItemContainerStyle>
									<Style TargetType="ListBoxItem">
										<Setter Property="VerticalContentAlignment" Value="Stretch"/>
										<Setter Property="Cursor" Value="Hand"/>
										<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>
								</ListBox.ItemContainerStyle>
								<ListBox.ItemsPanel>
									<ItemsPanelTemplate>
										<StackPanel Orientation="Horizontal" />
									</ItemsPanelTemplate>
								</ListBox.ItemsPanel>
								<ListBox.Template>
									<ControlTemplate TargetType="{x:Type ListBox}">
										<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled">
											<StackPanel Orientation="Horizontal" IsItemsHost="True" ScrollViewer.CanContentScroll="False"/>
										</ScrollViewer>
									</ControlTemplate>
								</ListBox.Template>
								<ListBox.ItemTemplate>
									<DataTemplate>
										<ItemsControl>
											<ItemsControl.Style>
												<Style TargetType="ItemsControl">
													<Setter Property="Template">
														<Setter.Value>
															<ControlTemplate>
																<Grid>
																	<util:ImageMenuItem Margin="0,0,5,0" MouseOverColor="#808080" MiniSource="{Binding MiniSource,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" Content="{Binding Name}" Source="{Binding Source,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" x:Name="btnSingle"/>
																	<util:DevMenuItemMulitClick Margin="0,0,5,0" MouseOverColor="#808080" Visibility="Collapsed" MiniSource="{Binding MiniSource,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" Content="{Binding Name}" Source="{Binding Source,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" IsClickServer="{Binding IsClickServer,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" IsClicenClient="{Binding IsClicenClient,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" x:Name="btnMulit"/>
																</Grid>

																<ControlTemplate.Triggers>
																	<DataTrigger Binding="{Binding IsServerClient,RelativeSource={RelativeSource AncestorType=local:DevMenuListBox}}" Value="True">
																		<Setter Property="Visibility" TargetName="btnSingle" Value="Collapsed"/>
																		<Setter Property="Visibility" TargetName="btnMulit" Value="Visible"/>
																	</DataTrigger>
																</ControlTemplate.Triggers>
															</ControlTemplate>
														</Setter.Value>
													</Setter>
												</Style>
											</ItemsControl.Style>
										</ItemsControl>
									</DataTemplate>
								</ListBox.ItemTemplate>
							</ListBox>
						</Grid>
					</Grid>
					<ControlTemplate.Triggers>
						<DataTrigger Binding="{Binding Path=ItemsSource.Count, RelativeSource={RelativeSource Self}}" Value="0">
							<Setter Property="Visibility" TargetName="imgNoDev" Value="Visible"/>
							<Setter Property="Visibility" TargetName="lstItem" Value="Collapsed"/>
						</DataTrigger>
						
						<Trigger Property="IsSmall" Value="True">
							<Setter Property="Visibility" TargetName="grdData" Value="Collapsed"/>
							
							<Setter Property="RenderTransform" TargetName="grdScale">
								<Setter.Value>
									<RotateTransform Angle="180"/>
								</Setter.Value>
							</Setter>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>