Files
tsWPFCore/tsTableView.xaml

50 lines
2.8 KiB
XML

<dxg:TableView x:Class="tsTableView" CustomRowAppearance="TableView_CustomRowAppearance" AllowMergedGrouping="True"
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"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPFCore="clr-namespace:tsWPFCore;assembly=tsWPFCore"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" >
<dxg:TableView.Resources>
<Style x:Key="tsRowStyle" TargetType="dxg:RowControl">
<Style.Triggers>
<Trigger Property="dxg:DataViewBase.IsFocusedRow" Value="True">
<Setter Property="Background" Value="LightBlue"/>
<Setter Property="Foreground" Value="{Binding Row.ColorFuenteFila}"/>
</Trigger>
<Trigger Property="dxg:DataViewBase.IsFocusedRow" Value="False">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="{Binding Row.ColorFuenteFila}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="tsCellStyle" TargetType="dxg:LightweightCellEditor">
<Style.Triggers>
<Trigger Property="dxg:DataViewBase.IsFocusedCell" Value="True">
<Setter Property="Background" Value="LightBlue"/>
<Setter Property="Foreground" Value="{Binding Row.ColorFuenteFila}"/>
</Trigger>
</Style.Triggers>
</Style>
</dxg:TableView.Resources>
<dxg:TableView.FocusedCellBorderTemplate>
<ControlTemplate>
<Border CornerRadius="3" BorderThickness="1.75" BorderBrush="Blue"/>
</ControlTemplate>
</dxg:TableView.FocusedCellBorderTemplate>
<dxg:TableView.GroupFooterSummaryContentStyle>
<Style TargetType="dx:DataContentPresenter">
<Setter Property="Control.FontWeight" Value="SemiBold" />
<Setter Property="Control.Foreground" Value="Blue" />
<Setter Property="TextBlock.TextAlignment" Value="Right" />
</Style>
</dxg:TableView.GroupFooterSummaryContentStyle>
<dxg:TableView.TotalSummaryContentStyle>
<Style TargetType="dx:DataContentPresenter">
<Setter Property="Control.FontWeight" Value="Bold" />
<Setter Property="Control.Foreground" Value="Blue" />
<Setter Property="TextBlock.TextAlignment" Value="Right" />
</Style>
</dxg:TableView.TotalSummaryContentStyle>
</dxg:TableView>