12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <fw:NChildWindow x:Class="Com.FirmLib.UI.Insuer.WinInsuerBaseInfo"
- 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:fw="http://schemas.FWind/xaml"
- xmlns:wpf="clr-namespace:FWindSoft.Wpf;assembly=FWindSoft.Wpf"
- xmlns:uc="clr-namespace:Com.FirmLib.UI.Common"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:behaviors="clr-namespace:FWindSoft.Wpf.Behaviors;assembly=FWindSoft.Wpf"
- mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="500" Title="保险商名称" Name="this" Height="{Binding Height,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}"
- Width="{Binding Width,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}" >
- <fw:NChildWindow.Resources>
- <wpf:BindingProxy x:Key="DATA" Data="{Binding}"></wpf:BindingProxy>
- </fw:NChildWindow.Resources>
- <Grid Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
- <Button Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.ButtonKey}}" Command="{Binding Commands.AddCommand}" Height="23" Margin="10" Content="添加保险商"/>
- <Button Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.ButtonKey}}" Height="23" Margin="10" Content="查看备选名片" />
- </StackPanel>
- <DataGrid Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" SelectionMode="Single" FrozenColumnCount="1" ItemsSource="{Binding Insuers}"
- CanUserAddRows="False"
- CanUserDeleteRows="False"
- VerticalScrollBarVisibility="Auto"
- HorizontalScrollBarVisibility="Auto"
- SelectionUnit="FullRow"
- HeadersVisibility="Column"
- CanUserSortColumns="True"
- CellStyle="{StaticResource ResourceKey={x:Static uc:CommonStyles.DataGridCellKey}}"
- AlternationCount="2"
- >
- <DataGrid.RowStyle>
- <Style TargetType="DataGridRow">
- <Setter Property="ContextMenu">
- <Setter.Value>
- <ContextMenu>
- <MenuItem Header="删除" Command="{Binding Data.Commands.DeleteCommand,Source={StaticResource ResourceKey=DATA}}" CommandParameter="{Binding }"></MenuItem>
- </ContextMenu>
- </Setter.Value>
- </Setter>
- <Setter Property="Height" Value="30"></Setter>
- <Style.Triggers>
- <Trigger Property="ItemsControl.AlternationIndex"
- Value="0">
- <Setter Property="Background" Value="White" />
- </Trigger>
- <Trigger Property="ItemsControl.AlternationIndex"
- Value="1">
- <Setter Property="Background" Value="#FFE6E3DD" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.RowStyle>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="操作" Width="60" IsReadOnly="True" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Command="{Binding DataContext.Commands.ManageCommand,ElementName=this}" Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.LinkButtonKey}}" CommandParameter="{Binding }" VerticalAlignment="Center" Content="管理" HorizontalAlignment="Left" Padding="5,0,5,0"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <fw:TDataGridTextColumn Header="保险商名称" Width="100" IsReadOnly="True" Binding="{Binding Path=Name}"></fw:TDataGridTextColumn>
- <fw:TDataGridTextColumn Header="保险商网址" Width="*" IsReadOnly="True" Binding="{Binding Path=Url}"></fw:TDataGridTextColumn>
- <fw:TDataGridTextColumn Header="提供保险服务的项目" Width="*" IsReadOnly="True" Binding="{Binding Path=RefProjectCount}"></fw:TDataGridTextColumn>
- </DataGrid.Columns>
- <i:Interaction.Behaviors>
- <behaviors:GridCellSingleClickEditBehavior></behaviors:GridCellSingleClickEditBehavior>
- </i:Interaction.Behaviors>
- </DataGrid>
- </Grid>
- </fw:NChildWindow>
|