WinInsuerBaseInfo.xaml 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <fw:NChildWindow x:Class="Com.FirmLib.UI.Insuer.WinInsuerBaseInfo"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:fw="http://schemas.FWind/xaml"
  7. xmlns:wpf="clr-namespace:FWindSoft.Wpf;assembly=FWindSoft.Wpf"
  8. xmlns:uc="clr-namespace:Com.FirmLib.UI.Common"
  9. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  10. xmlns:behaviors="clr-namespace:FWindSoft.Wpf.Behaviors;assembly=FWindSoft.Wpf"
  11. mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="500" Title="保险商名称" Name="this" Height="{Binding Height,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}"
  12. Width="{Binding Width,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}" >
  13. <fw:NChildWindow.Resources>
  14. <wpf:BindingProxy x:Key="DATA" Data="{Binding}"></wpf:BindingProxy>
  15. </fw:NChildWindow.Resources>
  16. <Grid Margin="5">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="Auto"></RowDefinition>
  19. <RowDefinition></RowDefinition>
  20. </Grid.RowDefinitions>
  21. <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
  22. <Button Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.ButtonKey}}" Command="{Binding Commands.AddCommand}" Height="23" Margin="10" Content="添加保险商"/>
  23. <Button Style="{StaticResource ResourceKey={x:Static uc:CommonStyles.ButtonKey}}" Height="23" Margin="10" Content="查看备选名片" />
  24. </StackPanel>
  25. <DataGrid Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" SelectionMode="Single" FrozenColumnCount="1" ItemsSource="{Binding Insuers}"
  26. CanUserAddRows="False"
  27. CanUserDeleteRows="False"
  28. VerticalScrollBarVisibility="Auto"
  29. HorizontalScrollBarVisibility="Auto"
  30. SelectionUnit="FullRow"
  31. HeadersVisibility="Column"
  32. CanUserSortColumns="True"
  33. CellStyle="{StaticResource ResourceKey={x:Static uc:CommonStyles.DataGridCellKey}}"
  34. AlternationCount="2"
  35. >
  36. <DataGrid.RowStyle>
  37. <Style TargetType="DataGridRow">
  38. <Setter Property="ContextMenu">
  39. <Setter.Value>
  40. <ContextMenu>
  41. <MenuItem Header="删除" Command="{Binding Data.Commands.DeleteCommand,Source={StaticResource ResourceKey=DATA}}" CommandParameter="{Binding }"></MenuItem>
  42. </ContextMenu>
  43. </Setter.Value>
  44. </Setter>
  45. <Setter Property="Height" Value="30"></Setter>
  46. <Style.Triggers>
  47. <Trigger Property="ItemsControl.AlternationIndex"
  48. Value="0">
  49. <Setter Property="Background" Value="White" />
  50. </Trigger>
  51. <Trigger Property="ItemsControl.AlternationIndex"
  52. Value="1">
  53. <Setter Property="Background" Value="#FFE6E3DD" />
  54. </Trigger>
  55. </Style.Triggers>
  56. </Style>
  57. </DataGrid.RowStyle>
  58. <DataGrid.Columns>
  59. <DataGridTemplateColumn Header="操作" Width="60" IsReadOnly="True" >
  60. <DataGridTemplateColumn.CellTemplate>
  61. <DataTemplate>
  62. <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"/>
  63. </DataTemplate>
  64. </DataGridTemplateColumn.CellTemplate>
  65. </DataGridTemplateColumn>
  66. <fw:TDataGridTextColumn Header="保险商名称" Width="100" IsReadOnly="True" Binding="{Binding Path=Name}"></fw:TDataGridTextColumn>
  67. <fw:TDataGridTextColumn Header="保险商网址" Width="*" IsReadOnly="True" Binding="{Binding Path=Url}"></fw:TDataGridTextColumn>
  68. <fw:TDataGridTextColumn Header="提供保险服务的项目" Width="*" IsReadOnly="True" Binding="{Binding Path=RefProjectCount}"></fw:TDataGridTextColumn>
  69. </DataGrid.Columns>
  70. <i:Interaction.Behaviors>
  71. <behaviors:GridCellSingleClickEditBehavior></behaviors:GridCellSingleClickEditBehavior>
  72. </i:Interaction.Behaviors>
  73. </DataGrid>
  74. </Grid>
  75. </fw:NChildWindow>