105 lines
3.6 KiB
XML
105 lines
3.6 KiB
XML
<UserControl
|
|
x:Class="_29WxOrderWpf.Ctrls.Statistics.ShowOrderDialogView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.Statistics"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:Background="White"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<!-- 单元格文字居中 -->
|
|
<Style x:Key="CenterCellTextStyle" TargetType="TextBlock">
|
|
<Setter Property="TextAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<DataGrid
|
|
d:ItemsSource="{d:SampleData ItemCount=10}"
|
|
AlternatingRowBackground="#FAFAFA"
|
|
AutoGenerateColumns="False"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
CanUserReorderColumns="False"
|
|
CanUserResizeRows="False"
|
|
ColumnHeaderStyle="{StaticResource BaseDataGridColumnHeaderStyle}"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
HorizontalGridLinesBrush="#EEEEEE"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding Data}"
|
|
RowHeight="44"
|
|
SelectionMode="Single"
|
|
SelectionUnit="FullRow"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<DataGrid.Columns>
|
|
<!-- 店名 -->
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding ShopName}"
|
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
|
Header="店名" />
|
|
|
|
<!-- 订单(可复制) -->
|
|
<DataGridTemplateColumn Width="2*" Header="订单">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<StackPanel
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding OrderId}"
|
|
ToolTip="点击“复制”复制订单号" />
|
|
<Button
|
|
Margin="5,0,0,0"
|
|
Click="CopyOrderId_Click"
|
|
Foreground="{StaticResource pageColorBrush}"
|
|
ToolTip="复制订单号">
|
|
<Button.Style>
|
|
<Style BasedOn="{StaticResource IconButtonStyle}" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{StaticResource pageColorBrush}" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=DataGridRow}, Path=IsSelected}" Value="True">
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Button.Style>
|
|
<TextBlock Style="{StaticResource TextBlockIcon}" Text="{StaticResource txt-copy}" />
|
|
|
|
</Button>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
|
|
<!-- 金额(分转元) -->
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding OrderPrice, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
|
Header="金额" />
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding RefundAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
|
Header="退款金额" />
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding OutAmount, Converter={StaticResource FenToYuanConverter}, StringFormat={}¥{0:N2}}"
|
|
ElementStyle="{StaticResource CenterCellTextStyle}"
|
|
Header="外采金额" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
</UserControl> |