|
|
|
|
<UserControl
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
x:Class="Kingo.Plugin.MapView.Views.BrowserLocal"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<Style TargetType="{x:Type DataGrid}">
|
|
|
|
|
<!--网格线颜色-->
|
|
|
|
|
<Setter Property="CanUserResizeColumns" Value="false"/>
|
|
|
|
|
<Setter Property="Background" Value="White" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFF5F7F5" />
|
|
|
|
|
<Setter Property="HorizontalGridLinesBrush" Value="White"/>
|
|
|
|
|
<Setter Property="VerticalGridLinesBrush" Value="White"/>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<!--标题栏样式-->
|
|
|
|
|
<Style TargetType="{x:Type DataGridColumnHeader}">
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
|
<Setter Property="MinWidth" Value="0" />
|
|
|
|
|
<Setter Property="MinHeight" Value="28" />
|
|
|
|
|
<Setter Property="Foreground" Value="#323433" />
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
|
|
|
|
|
<Border x:Name="BackgroundBorder" BorderThickness="0,1,0,1"
|
|
|
|
|
BorderBrush="White"
|
|
|
|
|
Width="Auto">
|
|
|
|
|
<Grid >
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
|
|
<Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0"
|
|
|
|
|
VerticalAlignment="Center" RenderTransformOrigin="1,1" />
|
|
|
|
|
<Rectangle Width="1" Fill="White" HorizontalAlignment="Right" Grid.ColumnSpan="1" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Setter Property="Height" Value="25"/>
|
|
|
|
|
</Style>
|
|
|
|
|
<!--行样式触发-->
|
|
|
|
|
<!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式-->
|
|
|
|
|
<Style TargetType="{x:Type DataGridRow}">
|
|
|
|
|
<Setter Property="Background" Value="White" />
|
|
|
|
|
<Setter Property="Height" Value="60"/>
|
|
|
|
|
<Setter Property="Foreground" Value="Black" />
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="LightGray"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Foreground" Value="Purple"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<!--单元格样式触发-->
|
|
|
|
|
<Style TargetType="{x:Type DataGridCell}">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
|
|
|
<TextBlock TextAlignment="Left" VerticalAlignment="Center" ><InlineUIContainer>
|
|
|
|
|
<ContentPresenter />
|
|
|
|
|
</InlineUIContainer></TextBlock>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="dgCell" TargetType="{x:Type TextBlock}">
|
|
|
|
|
<Setter Property="TextAlignment" Value="Left" />
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="ButtonStatusStyle" TargetType="{x:Type Button}">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
|
|
|
<Image Name="btnbg" Source="/Kingo.Plugin.MapView;component/Resources/Tool/btnbackunselected.png" />
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Source" Value="/Kingo.Plugin.MapView;component/Resources/Tool/btnbackselected.png" TargetName="btnbg"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
<Setter Property="Source" Value="/Kingo.Plugin.MapView;component/Resources/Tool/refreshcatalog.png" TargetName="btnbg" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
|
|
|
<Setter Property="Source" Value="/Kingo.Plugin.MapView;component/Resources/Tool/donotreturn.png" TargetName="btnbg" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
<Grid Margin="10,10,0,0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="40" />
|
|
|
|
|
<ColumnDefinition Width="50" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="30" MinHeight="30" MaxHeight="30" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" >
|
|
|
|
|
<Button x:Name="btnBack" Style="{DynamicResource ButtonStatusStyle}" Margin="12,2,2,0" ToolTip="返回至上一级" Click="BtnBack_Click" />
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0" Grid.Column="1">
|
|
|
|
|
<Label Grid.Row="0" Grid.Column="0" Content="目录:" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Black"
|
|
|
|
|
FontSize="14" FontFamily="./#仿宋_GB2312" Margin="10,0,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="0" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="0,0,0,0" Background="White">
|
|
|
|
|
<StackPanel>
|
|
|
|
|
<TextBox Name="tbCatalog" ToolTip="输入目录回车跳转" HorizontalAlignment="Stretch" VerticalAlignment="Center" FontSize="14" FontFamily="./#仿宋_GB2312"
|
|
|
|
|
Text="此电脑" Margin="0,0,0,0" Background="#F2F2F2"
|
|
|
|
|
MinWidth="120" KeyDown="TbCatalog_KeyDown" BorderThickness="0" MouseMove="TbCatalog_MouseMove" MouseLeave="TbCatalog_MouseLeave" />
|
|
|
|
|
<Label Name="lbInfoTemp" Content="" Height="0" Width="0"></Label>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" >
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="12*"/>
|
|
|
|
|
<ColumnDefinition Width="81*"/>
|
|
|
|
|
<ColumnDefinition Width="11*"/>
|
|
|
|
|
<ColumnDefinition Width="42*"/>
|
|
|
|
|
<ColumnDefinition Width="68*"/>
|
|
|
|
|
<ColumnDefinition Width="472*"/>
|
|
|
|
|
<ColumnDefinition Width="115*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<DataGrid x:Name="dgBrowserLocal" AutoGenerateColumns="False" VerticalAlignment="Top"
|
|
|
|
|
HorizontalGridLinesBrush="#D2D2D2" VerticalGridLinesBrush="{x:Null}"
|
|
|
|
|
CanUserSortColumns="False" Margin="5,5,5,0" IsReadOnly="True"
|
|
|
|
|
CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
|
|
|
|
|
CanUserReorderColumns="False" AlternationCount="2" RowHeaderWidth="0" CanUserAddRows="False"
|
|
|
|
|
LoadingRow="DgBrowserLocal_LoadingRow"
|
|
|
|
|
MouseDoubleClick="DgBrowserLocal_MouseDoubleClick" SizeChanged="DgBrowserLocal_SizeChanged" Grid.ColumnSpan="7" GridLinesVisibility="Horizontal" >
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTemplateColumn Width="50" Header="" >
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
<DataTemplate >
|
|
|
|
|
<Image Margin="10,0,0,0" Width="28" Height="28" Source="{Binding FileImage}" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
<DataGridTextColumn Header="名称" Width="*" Binding="{Binding Name}" ElementStyle="{StaticResource dgCell}"/>
|
|
|
|
|
<DataGridTextColumn Header="" Width="50" />
|
|
|
|
|
<DataGridTextColumn Header="修改日期" Width="220" FontSize="14" Binding="{Binding RecentOpenDate}"/>
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|