- 浏览: 204310 次
- 性别:
- 来自: 成都
文章分类
- 全部博客 (231)
- C++学习 (41)
- vc学习 (25)
- vc异常 (4)
- Flex (2)
- Ext (0)
- java学习笔记 (15)
- mysql学习笔记 (1)
- ibatis学习笔记 (7)
- struts1学习笔记 (1)
- hibernate学习笔记 (3)
- javascript学习笔记 (8)
- eclipse快捷键 (2)
- 英语学习 (1)
- cmd (1)
- eclipse 配置 (2)
- 其他 (4)
- JAVASE (34)
- firefox (1)
- linux (8)
- Apache (6)
- cms (22)
- jsuc (10)
- html (3)
- css (1)
- 作图 (2)
- vs2012 (2)
- 编码转换 (12)
- work_unicode (1)
- work_webbrowser (1)
- work_trade_quotes_login (1)
- c#学习 (38)
- wpf学习 (31)
- wpf快速学习 (1)
- VB学习 (1)
- NSIS (4)
- log4cpp (3)
- 学习web (1)
- 经验 (1)
- c_汇编 (1)
最新评论
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--自定义DataGrid样式-->
<Style x:Key="CustomDataGrid" TargetType="DataGrid">
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="CanUserSortColumns" Value="True"></Setter>
<Setter Property="HorizontalGridLinesBrush" Value="Gray"></Setter>
<Setter Property="VerticalGridLinesBrush" Value="Gray"></Setter>
<Setter Property="BorderBrush" Value="Gray"></Setter>
<Setter Property="ColumnWidth" Value="auto"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="RowHeight" Value="22"></Setter>
<Setter Property="RowHeaderStyle">
<Setter.Value>
<Style x:Name="CustomDataGridRowHeader" TargetType="DataGridRowHeader">
<!--
<Setter Property="Background" Value="#DDD"/>
<Setter Property="Padding" Value="5,0,5,0"></Setter>
-->
<Setter Property="Width" Value="Auto"></Setter>
<Setter Property="MinWidth" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="CustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="CellStyle">
<Setter.Value>
<Style x:Name="CustamDataGridCell" TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
<!--设置DataGrid单元格垂直居中显示-->
<Style x:Key="dgCellTextBlock" TargetType="TextBlock">
<Setter Property="Padding" Value="2,3,2,0"></Setter>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<!--设置DataGrid单元格数字靠右显示-->
<Style x:Key="dgCellTextBlockRight" TargetType="TextBlock">
<Setter Property="Padding" Value="2,3,3,0"></Setter>
<Setter Property="TextAlignment" Value="Right"/>
</Style>
<Style x:Key="FQCustomDataGrid" TargetType="DataGrid">
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="BorderBrush" Value="Black"></Setter>
<Setter Property="GridLinesVisibility" Value="None"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="CanUserSortColumns" Value="False"></Setter>
<Setter Property="ColumnWidth" Value="auto"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="RowHeight" Value="22"></Setter>
<Setter Property="HeadersVisibility" Value="Column"></Setter>
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="RowHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridRowHeader" TargetType="DataGridRowHeader">
<!--<Setter Property="Background" Value="Black"/>-->
<!--<Setter Property="Padding" Value="5,0,5,0"></Setter>-->
<Setter Property="Width" Value="Auto"></Setter>
<Setter Property="MinWidth" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="DataGridColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}" >
<Setter Property="Height" Value="25"></Setter>
<Setter Property="Background" Value="Black" />
<Setter Property="Foreground" Value="White" />
<Style.Triggers>
<!--<Trigger Property="SortDirection" Value="{x:Null}">
<Setter Property="Background" Value="{DynamicResource DataGridHeaderBackgroundBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Trigger>-->
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="SortDirection" Value="{x:Null}" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource DataGridHeaderMouseOverBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource DataGridHeaderBorderBrush}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true" />
<Condition Property="SortDirection" Value="{x:Null}" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource DataGridHeaderMouseOverBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource DataGridHeaderBorderBrush}" />
</MultiTrigger>-->
<Trigger Property="SortDirection" Value="Ascending">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrowUp" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="Red" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="SortDirection" Value="Descending">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrow" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
<!--<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,0,5,0"></Setter>
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="28" />
<Setter Property="Foreground" Value="Green" />
<Setter Property="Background" Value="Black"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
<Path x:Name="SortArrowUp" Visibility="Collapsed" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="Red" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="SortDirection" Value="Descending">
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>-->
<!--<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,0,5,0"></Setter>
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="28" />
<Setter Property="Foreground" Value="Green" />
<Setter Property="Background" Value="Black"/>
<Setter Property="AllowDrop" Value="True"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="FontSize" Value="14" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridColumnHeader">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Path x:Name="SortArrow" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0"
VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Height" Value="25"/>
</Style>
</Setter.Value>
</Setter>-->
<Setter Property="CellStyle">
<Setter.Value>
<Style x:Name="FQCustamDataGridCell" TargetType="DataGridCell">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="Red"/>
<Setter Property="BorderThickness" Value="0"></Setter>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="DataGridRow">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FQDataGridCellBase" TargetType="DataGridCell">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
<Setter Property="BorderThickness" Value="0"></Setter>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FQDataGridRowBase" TargetType="DataGridRow">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<!--设置DataGrid单元格前景色Yellow-->
<Style x:Key="dgCellTextBlockForegroundYellow" TargetType="TextBlock">
<Setter Property="Foreground" Value="Yellow"></Setter>
</Style>
<!--设置DataGrid单元格前景色Yellow-->
<Style x:Key="dgCellTextBlockForegroundWhite" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"></Setter>
</Style>
</ResourceDictionary>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--自定义DataGrid样式-->
<Style x:Key="CustomDataGrid" TargetType="DataGrid">
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="CanUserSortColumns" Value="True"></Setter>
<Setter Property="HorizontalGridLinesBrush" Value="Gray"></Setter>
<Setter Property="VerticalGridLinesBrush" Value="Gray"></Setter>
<Setter Property="BorderBrush" Value="Gray"></Setter>
<Setter Property="ColumnWidth" Value="auto"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="RowHeight" Value="22"></Setter>
<Setter Property="RowHeaderStyle">
<Setter.Value>
<Style x:Name="CustomDataGridRowHeader" TargetType="DataGridRowHeader">
<!--
<Setter Property="Background" Value="#DDD"/>
<Setter Property="Padding" Value="5,0,5,0"></Setter>
-->
<Setter Property="Width" Value="Auto"></Setter>
<Setter Property="MinWidth" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="CustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="CellStyle">
<Setter.Value>
<Style x:Name="CustamDataGridCell" TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
<!--设置DataGrid单元格垂直居中显示-->
<Style x:Key="dgCellTextBlock" TargetType="TextBlock">
<Setter Property="Padding" Value="2,3,2,0"></Setter>
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<!--设置DataGrid单元格数字靠右显示-->
<Style x:Key="dgCellTextBlockRight" TargetType="TextBlock">
<Setter Property="Padding" Value="2,3,3,0"></Setter>
<Setter Property="TextAlignment" Value="Right"/>
</Style>
<Style x:Key="FQCustomDataGrid" TargetType="DataGrid">
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="BorderBrush" Value="Black"></Setter>
<Setter Property="GridLinesVisibility" Value="None"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="AutoGenerateColumns" Value="False"></Setter>
<Setter Property="CanUserResizeRows" Value="False"></Setter>
<Setter Property="CanUserAddRows" Value="False"></Setter>
<Setter Property="SelectionMode" Value="Single"></Setter>
<Setter Property="CanUserSortColumns" Value="False"></Setter>
<Setter Property="ColumnWidth" Value="auto"></Setter>
<Setter Property="IsReadOnly" Value="True"></Setter>
<Setter Property="RowHeight" Value="22"></Setter>
<Setter Property="HeadersVisibility" Value="Column"></Setter>
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="RowHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridRowHeader" TargetType="DataGridRowHeader">
<!--<Setter Property="Background" Value="Black"/>-->
<!--<Setter Property="Padding" Value="5,0,5,0"></Setter>-->
<Setter Property="Width" Value="Auto"></Setter>
<Setter Property="MinWidth" Value="0"></Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="DataGridColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}" >
<Setter Property="Height" Value="25"></Setter>
<Setter Property="Background" Value="Black" />
<Setter Property="Foreground" Value="White" />
<Style.Triggers>
<!--<Trigger Property="SortDirection" Value="{x:Null}">
<Setter Property="Background" Value="{DynamicResource DataGridHeaderBackgroundBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Trigger>-->
<!--<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="SortDirection" Value="{x:Null}" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource DataGridHeaderMouseOverBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource DataGridHeaderBorderBrush}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="true" />
<Condition Property="SortDirection" Value="{x:Null}" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{StaticResource DataGridHeaderMouseOverBackgroundBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource DataGridHeaderBorderBrush}" />
</MultiTrigger>-->
<Trigger Property="SortDirection" Value="Ascending">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrowUp" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="Red" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="SortDirection" Value="Descending">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrow" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
<!--<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,0,5,0"></Setter>
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="28" />
<Setter Property="Foreground" Value="Green" />
<Setter Property="Background" Value="Black"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid x:Name="GridContentTemplate">
<Label Background="Black" Foreground="White" Content="{TemplateBinding Content}"/>
<Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
<Path x:Name="SortArrowUp" Visibility="Collapsed" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="Red" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="SortDirection" Value="Descending">
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>-->
<!--<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style x:Name="FQCustomDataGridColumnHeader" TargetType="DataGridColumnHeader">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Padding" Value="5,0,5,0"></Setter>
<Setter Property="MinWidth" Value="0" />
<Setter Property="MinHeight" Value="28" />
<Setter Property="Foreground" Value="Green" />
<Setter Property="Background" Value="Black"/>
<Setter Property="AllowDrop" Value="True"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="FontSize" Value="14" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridColumnHeader">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Path x:Name="SortArrow" Visibility="Visible" Data="M0,0 L1,0 L0.5,1 z" Stretch="Fill" Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0"
VerticalAlignment="Center" RenderTransformOrigin="1,1" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Height" Value="25"/>
</Style>
</Setter.Value>
</Setter>-->
<Setter Property="CellStyle">
<Setter.Value>
<Style x:Name="FQCustamDataGridCell" TargetType="DataGridCell">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="Red"/>
<Setter Property="BorderThickness" Value="0"></Setter>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="DataGridRow">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FQDataGridCellBase" TargetType="DataGridCell">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
<Setter Property="BorderThickness" Value="0"></Setter>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FQDataGridRowBase" TargetType="DataGridRow">
<Style.Setters>
<Setter Property="Background" Value="Black"/>
</Style.Setters>
<Style.Triggers>
<!--<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="Gold"></Setter>
</Trigger.Setters>
</Trigger>-->
<Trigger Property="IsSelected" Value="True">
<Trigger.Setters>
<Setter Property="Background" Value="BlueViolet"></Setter>
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<!--设置DataGrid单元格前景色Yellow-->
<Style x:Key="dgCellTextBlockForegroundYellow" TargetType="TextBlock">
<Setter Property="Foreground" Value="Yellow"></Setter>
</Style>
<!--设置DataGrid单元格前景色Yellow-->
<Style x:Key="dgCellTextBlockForegroundWhite" TargetType="TextBlock">
<Setter Property="Foreground" Value="White"></Setter>
</Style>
</ResourceDictionary>
发表评论
-
byte数组直接输出
2016-07-19 11:38 1248byte数组直接输出 BitConverter.ToStrin ... -
wfi:WindowsFormsHost焦点设置
2016-07-05 17:56 580<wfi:WindowsFormsHost> ... -
x:Name
2016-04-25 10:44 450由于“Dameer”是在同一程序集中实现的,您必须设置 x:N ... -
WindowsFormsHost的使用注意
2016-04-25 10:24 1347一使用 1 引用 2 xmlns:wfi ="clr ... -
TextBox滚动条
2016-04-22 16:51 656<TextBox Grid.Row="1& ... -
TextBlock滚动条
2016-04-22 16:49 453<ScrollViewer Name="s ... -
C#_WPF_WPF用户控件库
2016-04-12 11:37 798新建项目》window桌面》WPF用户控件库 -
DependencyProperty.UnsetValue_WPF涉及到资源的嵌套引用,被引用的资源要定义在引用的资源前面
2015-10-27 15:09 1992错误 1 “{DependencyProperty.Unset ... -
string格式的日期时间字符串转为DateTime类型
2015-08-05 14:22 963string格式的日期时间字符串转为DateTime类型 / ... -
checkbox
2015-07-28 17:18 554private void Chec ... -
x:Name x:Key Name区别
2015-06-25 15:40 597x:Name x:Key Name区别 1、x:Key 只 ... -
work_代码添加
2015-06-23 17:15 507<UserControl x:Class=" ... -
FindName和VisualTreeHelper
2015-06-19 13:23 756int iCount = this.dataGridCan ... -
理解WPF中的视觉树和逻辑树(转载)
2015-06-19 13:00 585理解WPF中的视觉树和逻辑树 理解WPF中的 ... -
理解WPF中的视觉树和逻辑树(转载)
2015-06-19 12:58 1678理解WPF中的视觉树和逻 ... -
GetEnumerator
2015-06-19 12:39 649IEnumerator enumerator = this ... -
资源文件获取配置
2015-06-18 16:03 368object obj = Application.Curren ... -
Pack URI
2015-06-18 15:41 684主要用来定位 资源文 ... -
wpf学习之ObservableCollection<T>相关知识
2015-04-23 11:10 3305本篇学习了ObservableCollection<T& ... -
C#学习之DateTime
2015-04-23 10:30 450DateTime string.Format("{ ...
相关推荐
自定义DataGrid样式可以帮助开发者根据应用程序的需求调整控件的外观和交互方式,使其更符合用户界面的设计规范。下面我们将深入探讨如何自定义DataGrid样式及其相关的知识点。 1. **创建资源字典** 自定义...
在IT领域,自定义Datagrid是一项常见的需求,尤其是在开发数据密集型应用时。Datagrid是一种用于展示和操作表格数据的控件,它允许用户以视觉上友好的方式查看和交互大量结构化的信息。本资源围绕C#语言环境下的...
本篇文章将详细介绍如何利用 WPF 的 `ControlTemplate` 对 `DataGrid` 进行自定义样式,以及如何为特定行或列定制样式。 首先,`ControlTemplate` 是 WPF 中的一个重要概念,它允许我们完全重新定义控件的外观。...
WPF中DataGrid控件有时需要在一列中显示多个字段数据,并实现一定的排版,本示例即为解决此类问题提供参考。
"Grid(6)[自定义DataGrid-强制显示分列线(在不显示列头时)]"这个标题表明我们正在讨论一个关于数据网格(DataGrid)的自定义实现,具体是针对Flex或Flash环境中的MXML组件。这里的“Grid(6)”可能指的是该系列教程的...
本文将深入探讨如何在Flex中自定义Datagrid的ItemRender,以实现按钮、单选、复选和日期等控件的集成。 首先,我们需要了解ItemRender的基本概念。ItemRenderer是Flex提供的一种机制,允许开发者为数据网格中的每一...
总的来说,这个项目涉及了自定义`DataGrid`控件的实现,通过数据集与数据库进行数据绑定,同时利用自定义列样式实现编辑、下拉列表和选择框等功能。开发者需要对.NET Compact Framework、Windows Forms以及数据库...
本话题将深入探讨如何自定义DataGrid的分页块,实现一个完美的分页效果。 DataGrid的分页功能默认提供了一些基本选项,如每页显示的记录数和页码导航。然而,这些默认设置可能无法满足所有需求,比如自定义样式、...
总的来说,通过自定义DataGrid的渲染器,我们可以实现更灵活的数据显示效果。在这个例子中,我们学会了如何根据数据的值动态改变单元格的颜色,增强了用户界面的交互性和可视化效果。这种技术在数据监控、报表展示等...
文件列表“DataGrid样式”可能是一个项目文件,里面可能有XAML和C#代码,用于展示如何自定义DataGrid样式、实现表头合并以及分页功能。通过研究这些代码,开发者可以更好地理解如何在实际项目中应用这些技术。 总结...
在本话题中,我们将探讨如何自定义网页风格的`datagrid`,使其更适应网络开发的需求。 首先,让我们了解`datagrid`的基本概念。`datagrid`通常是一个JavaScript库或框架中的组件,如jQuery UI、ExtJS或AngularJS等...
综上所述,通过各种方式我们可以实现DataGrid的自定义列标题,包括文本、样式、交互性和动态调整列宽等特性,以满足不同场景下的需求。在实际项目中,根据具体业务逻辑和界面设计灵活运用这些方法,能够打造出更加...
在提供的`CustomDataGridHeader`文件中,可能包含了实现这一功能的具体代码示例,包括自定义HeaderRenderer组件的定义、配置DataGrid的列定义以及可能的样式和交互逻辑。通过查看和学习这个示例,你可以更深入地了解...
1. **整体外观**:你可以自定义DataGrid的整体背景色、边框颜色、边框宽度等。这可以通过设置DataGrid的Background、BorderBrush和BorderThickness属性来实现。 2. **单元格样式**:DataGrid中的每个单元格都可以有...
自定义Datagrid列及列头意味着开发者可以根据需求调整列的显示样式,如宽度、字体、颜色等。此外,还可以定制列头的功能,如排序、过滤等。内容对齐方式的设置则涉及CSS样式,可以控制单元格内容的水平和垂直对齐。 ...
本项目“wpf 自定义ComBoBox带DataGrid”旨在实现一个具有组合框(ComboBox)与数据网格(DataGrid)功能结合的控件,这种控件在很多业务场景下都非常实用,例如在选择数据项时提供详细信息预览。 **组合框...
DataGrid的行单元格合并功能并不是默认支持的,因此通常需要通过自定义样式、模板和数据绑定来实现。下面将详细介绍如何在WPF中实现DataGrid的行单元格合并,以及如何利用提供的"TestDataGridMergeCell"文件进行操作...
总结,"好看的Silverlight Datagrid样式"涉及到的内容广泛,包括但不限于DataGrid控件的基础知识、样式和模板的定制、DataGridTextColumn的使用以及如何通过动画和性能优化提升用户体验。通过对这些知识点的掌握和...
本篇将深入探讨`WPF DataGrid`的样式定制,以及如何通过提供的文件名如`WPF-DataGrid.txt`、`WPF-DataGrid1.txt`和`WPF-DataGrid2.txt`来学习和理解相关知识。 1. **基础样式** `DataGrid`的外观可以通过设置`...