提交 7ecb5fe5 编写于 作者: cdy816's avatar cdy816

深色样式完善

上级 072def3c
......@@ -147,7 +147,7 @@
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd" Value="#3F000000"/>
<Setter Property="Background" TargetName="Bd" Value="#3FFFFFFF"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
......@@ -170,13 +170,14 @@
</Style.Triggers>
</Style>
</Window.Resources>
<Grid x:Name="bg" Margin="5" Background="#F2404040">
<Border BorderThickness="1" BorderBrush="Gray" Margin="5">
<Grid x:Name="bg" Background="#CF000000">
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="48"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Background="#7F000000" MouseMove="Grid_MouseMove" MouseLeftButtonUp="Grid_MouseLeftButtonUp" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
<Grid Background="#9F000000" MouseMove="Grid_MouseMove" MouseLeftButtonUp="Grid_MouseLeftButtonUp" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
<ProgressBar Maximum="100" Minimum="0" Value="{Binding ProcessNotify}" Background="Transparent" VerticalAlignment="Top" Height="32" BorderThickness="0" BorderBrush="Transparent" />
<Image Margin="5,0" Source="{Binding Icon,RelativeSource={RelativeSource AncestorType=Window}}" Height="16" HorizontalAlignment="Left" Width="24" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill" />
<Label Margin="30,0,115,0" VerticalContentAlignment="Center" Content="{Binding Title,RelativeSource={RelativeSource AncestorType=Window}}" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=Window}}"/>
......@@ -232,7 +233,7 @@
<DataTemplate>
<StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" >
<Image Source="/Image/log-out.png" Height="22" RenderOptions.BitmapScalingMode="HighQuality"/>
<TextBlock Text="{local:ResMarker Logout}" Foreground="DarkRed" VerticalAlignment="Center" Margin="5,0"/>
<TextBlock Text="{local:ResMarker Logout}" FontWeight="Bold" Foreground="DarkRed" VerticalAlignment="Center" Margin="5,0"/>
</StackPanel>
</DataTemplate>
</Button.ContentTemplate>
......@@ -339,7 +340,7 @@
<ColumnDefinition Width="180" MinWidth="30" MaxWidth="1000"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="tv" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=Window}}" ItemContainerStyle="{DynamicResource TreeViewItemStyle1}" ItemsSource="{Binding TagGroup}" SelectedItemChanged="TreeView_SelectedItemChanged" BorderThickness="0,0,1,1" Margin="0,0,0,32" Background="#1FFFFFFF">
<TreeView x:Name="tv" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=Window}}" ItemContainerStyle="{DynamicResource TreeViewItemStyle1}" ItemsSource="{Binding TagGroup}" SelectedItemChanged="TreeView_SelectedItemChanged" BorderThickness="0,0,1,1" Margin="0,0,0,32" Background="#7F000000">
<TreeView.InputBindings>
<KeyBinding Key="F2" Command="{Binding ReNameCommand}" />
<KeyBinding Key="Delete" Command="{Binding RemoveCommand}" />
......@@ -476,4 +477,5 @@
</Grid>
</Grid>
</Border>
</Window>
......@@ -213,19 +213,20 @@
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<!--<Setter Property="ResizeMode" Value="CanResizeWithGrip" />-->
<Setter Property="Background" Value="#F2404040" />
<Setter Property="Foreground" Value="#FFFAFAFA" />
<!--<Setter Property="ResizeMode" Value="{Binding IsEnableMax,Converter={StaticResource BoolToResize}}" />-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CustomWindowBase}">
<Grid Background="{TemplateBinding Background}" x:Name="head" >
<Border BorderThickness="1" BorderBrush="DarkGray">
<Grid Background="#7F000000" x:Name="head" >
<Grid.RowDefinitions>
<RowDefinition Height="32" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Background="#4F000000">
<Grid Background="#7F000000">
<Image Margin="5,0" Source="{Binding Icon,RelativeSource={RelativeSource AncestorType=Window}}" Height="16" HorizontalAlignment="Left" Width="24" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill" />
<Label Margin="30,0,115,0" VerticalContentAlignment="Center" Content="{Binding Title,RelativeSource={RelativeSource AncestorType=Window}}" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=Window}}"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
......@@ -260,8 +261,11 @@
</Button>
</StackPanel>
</Grid>
<ContentControl Grid.Row="1" x:Name="content_host" Content="{Binding}" Margin="0" />
<Border Height="32" Grid.Row="2" BorderBrush="Gray" BorderThickness="0,1,0,0" Background="#1F000000" Visibility="{Binding IsOkCancel,Converter={StaticResource bvc}}">
<Grid Grid.Row="1" Background="#1FFFFFFF">
<ContentControl x:Name="content_host" Content="{Binding}" Margin="0" />
</Grid>
<Border Height="32" Grid.Row="2" BorderBrush="Gray" BorderThickness="0,1,0,0" Visibility="{Binding IsOkCancel,Converter={StaticResource bvc}}">
<Grid Margin="0" >
<Label Content="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,200,0" />
<Button Style="{DynamicResource ButtonStyle1}" Name="btn_Cancel" Background="#1FFFFFFF" IsCancel="{Binding IsEnableDefault}" Content="{local:ResMarker Cancel}" Height="22" Width="75" Margin="0,0,10,0" Command="{Binding CancelCommand}" HorizontalAlignment="Right" VerticalAlignment="Center" >
......@@ -287,6 +291,7 @@
</Grid>
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsOkCancel}" Value="False" >
<Setter TargetName="btn_OK" Property="IsDefault" Value="False" />
......
......@@ -77,7 +77,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Margin="10,0" Text="{res:ResMarker SelectDatabase}" HorizontalAlignment="Left" VerticalAlignment="Center" />
<ListBox Background="#1FFFFFFF" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" Margin="-1" Grid.Row="1" BorderThickness="0" ItemsSource="{Binding DatabaseItems}" SelectedItem="{Binding SelectDatabase,Mode=TwoWay}">
<ListBox Background="Transparent" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" Margin="-1" Grid.Row="1" BorderThickness="0,1,0,0" ItemsSource="{Binding DatabaseItems}" SelectedItem="{Binding SelectDatabase,Mode=TwoWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid MinHeight="28">
......
......@@ -75,7 +75,7 @@
</Grid.RowDefinitions>
<Border BorderBrush="Gray" BorderThickness="0,0,0,1"/>
<Label Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" Content="{res:ResMarker UserList}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<ListBox Background="#1FFFFFFF" ItemsSource="{Binding Users}" HorizontalContentAlignment="Stretch" SelectedItem="{Binding CurrentSelectedUser}" Grid.Row="1" HorizontalAlignment="Left" Width="300" Margin="5,5,0,1">
<ListBox Background="Transparent" ItemsSource="{Binding Users}" HorizontalContentAlignment="Stretch" SelectedItem="{Binding CurrentSelectedUser}" Grid.Row="1" HorizontalAlignment="Left" Width="300" Margin="5,5,0,1">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Height="26">
......@@ -128,7 +128,7 @@
<TextBox Background="#1FFFFFFF" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" VerticalContentAlignment="Center" Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=LostFocus}" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="300" Height="26" Grid.Column="1" KeyDown="TextBox_KeyDown" />
<!--<PasswordBox HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Width="300" Height="26" Grid.Column="1" Password="123456" Grid.Row="1" PasswordChanged="PasswordBox_PasswordChanged"/>-->
<res:PasswordControl BorderBrush="Gray" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" BorderThickness="1" Password="{Binding Password,Mode=TwoWay}" Grid.Column="1" Grid.Row="1" Margin="10,0,0,0" Width="300" VerticalAlignment="Center" Height="26" HorizontalAlignment="Left"/>
<ListBox Style="{DynamicResource ListBoxStyle1}" Background="#1FFFFFFF" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" IsEnabled="{Binding IsAdmin,Converter={StaticResource bic}}" ItemsSource="{Binding PermissionModel}" Grid.Column="1" Grid.Row="4" Margin="10,10,0,0" Width="300" HorizontalAlignment="Left" >
<ListBox Style="{DynamicResource ListBoxStyle1}" Background="Transparent" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" IsEnabled="{Binding IsAdmin,Converter={StaticResource bic}}" ItemsSource="{Binding PermissionModel}" Grid.Column="1" Grid.Row="4" Margin="10,10,0,0" Width="300" HorizontalAlignment="Left" >
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox BorderBrush="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Content="{Binding Name}" />
......
......@@ -124,7 +124,7 @@
</Style>
</UserControl.Resources>
<Grid>
<DataGrid RowHeaderWidth="0" ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle1}" CellStyle="{DynamicResource DataGridCellStyle1}" RowStyle="{DynamicResource DataGridRowStyle1}" ScrollViewer.CanContentScroll="True" ContextMenu="{StaticResource ctxmenu}" VerticalScrollBarVisibility="Auto" ScrollViewer.ScrollChanged="DataGrid_ScrollChanged" VirtualizingPanel.IsVirtualizing="True" RowDetailsVisibilityMode="VisibleWhenSelected" MinRowHeight="24" Margin="0,0,0,32" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding SelectGroupTags}" SelectedItem="{Binding CurrentSelectTag,Mode=TwoWay}" BorderThickness="0,0,0,1" Background="#1FFFFFFF" >
<DataGrid RowHeaderWidth="0" ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle1}" CellStyle="{DynamicResource DataGridCellStyle1}" RowStyle="{DynamicResource DataGridRowStyle1}" ScrollViewer.CanContentScroll="True" ContextMenu="{StaticResource ctxmenu}" VerticalScrollBarVisibility="Auto" ScrollViewer.ScrollChanged="DataGrid_ScrollChanged" VirtualizingPanel.IsVirtualizing="True" RowDetailsVisibilityMode="VisibleWhenSelected" MinRowHeight="24" Margin="0,0,0,32" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding SelectGroupTags}" SelectedItem="{Binding CurrentSelectTag,Mode=TwoWay}" BorderThickness="0,0,0,1" Background="Transparent" >
<DataGrid.InputBindings>
<KeyBinding Command="{Binding CopyCommand}" Key="C" Modifiers="Ctrl" />
<KeyBinding Command="{Binding PasteCommand}" Key="V" Modifiers="Ctrl" />
......
......@@ -39,7 +39,7 @@
</Grid.RowDefinitions>
<Border BorderBrush="Gray" BorderThickness="0,0,0,1"/>
<Label Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" Content="{res:ResMarker UserList}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<ListBox Background="#1FFFFFFF" ItemsSource="{Binding Users}" HorizontalContentAlignment="Stretch" SelectedItem="{Binding CurrentSelectedUser}" Grid.Row="1" HorizontalAlignment="Left" Width="300" Margin="5,5,0,0">
<ListBox Background="Transparent" ItemsSource="{Binding Users}" HorizontalContentAlignment="Stretch" SelectedItem="{Binding CurrentSelectedUser}" Grid.Row="1" HorizontalAlignment="Left" Width="300" Margin="5,5,0,0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Height="26">
......@@ -87,7 +87,7 @@
<TextBox Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" Background="#1FFFFFFF" IsEnabled="{Binding IsNew}" VerticalContentAlignment="Center" Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="300" Height="26" Grid.Column="1" />
<!--<PasswordBox HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="10,0,0,0" VerticalAlignment="Center" Width="300" Height="26" Grid.Column="1" Password="123456" Grid.Row="1" PasswordChanged="PasswordBox_PasswordChanged"/>-->
<res:PasswordControl Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" BorderBrush="Gray" BorderThickness="1" Password="{Binding Password,Mode=TwoWay}" Grid.Column="1" Grid.Row="1" Margin="10,0,0,0" Width="300" VerticalAlignment="Center" Height="26" HorizontalAlignment="Left"/>
<ListBox Background="#1FFFFFFF" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" ItemsSource="{Binding PermissionModel}" Grid.Column="1" Grid.Row="2" Margin="10,10,0,0" Width="300" HorizontalAlignment="Left" >
<ListBox Background="Transparent" ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle1}" ItemsSource="{Binding PermissionModel}" Grid.Column="1" Grid.Row="2" Margin="10,10,0,0" Width="300" HorizontalAlignment="Left" >
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Background="#1FFFFFFF" BorderBrush="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" Foreground="{Binding Foreground,RelativeSource={RelativeSource AncestorType=UserControl}}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Content="{Binding Name}" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册