123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:resx="clr-namespace:GDNXFD.Alert.Config.Resources.Strings">
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/Resources/Common/CommonResources.xaml"/>
- <ResourceDictionary Source="/Resources/Common/RadioButtonStyles.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <ObjectDataProvider x:Key="Provider" ObjectType="{x:Type resx:StringProvider}" MethodName="GetResourceInstance"></ObjectDataProvider>
- <DataTemplate x:Key="ListRulesTemplate">
- <Grid Height="70" HorizontalAlignment="Stretch" Margin="0,0,0,5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70"></ColumnDefinition>
- <ColumnDefinition Width="150"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="70"></ColumnDefinition>
- <ColumnDefinition Width="70"></ColumnDefinition>
- <ColumnDefinition Width="70"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <!--
- <Image Source="{Binding EmployeePhoto, Converter={StaticResource ByteToImageConverter}}" Margin="0,0,5,0"
- Width="auto" Height="auto" Grid.Column="0" Stretch="UniformToFill"></Image>
- -->
- <Border Background="{StaticResource module-primary-color-over-brush}" Grid.Column="0" Margin="0,0,5,0">
- <TextBlock TextWrapping="NoWrap" TextTrimming="WordEllipsis" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Run Style="{StaticResource ListTextBigLight}" Text="{Binding Id}"></Run>
- </TextBlock>
- </Border>
-
- <Border Background="{StaticResource module-primary-color-light-brush}" Grid.Column="1" Margin="0,0,5,0"
- Padding="15,10,5,5">
- <TextBlock TextWrapping="NoWrap" TextTrimming="WordEllipsis">
- <Run Style="{StaticResource ListTextBigLight}" Text="{Binding Name}"></Run>
- <LineBreak></LineBreak>
- <Run Style="{StaticResource ListTextSmallLight}" Text="{Binding Rank}"></Run>
- </TextBlock>
- </Border>
- <Border Background="{StaticResource second-background-color-brush}" Grid.Column="2"
- Padding="15,10,5,5">
- <TextBlock TextWrapping="NoWrap" TextTrimming="WordEllipsis">
- <Run Style="{StaticResource ListTextBigDark}" Text="{Binding Expression}"></Run>
- </TextBlock>
- </Border>
- <Border Background="{StaticResource second-background-color-brush}" Grid.Column="3" Margin="0,0,5,0"
- Padding="15,10,5,5">
- <TextBlock TextWrapping="NoWrap" TextTrimming="WordEllipsis">
- <Run Style="{StaticResource ListTextBigDark}" Text="{Binding Description}"></Run>
- <LineBreak></LineBreak>
- <Run Style="{StaticResource ListTextSmallDark}" Text="{Binding Tag}"></Run>
- </TextBlock>
- </Border>
- <Button CommandParameter="{Binding}" Margin="0,0,5,0"
- ToolTip="{Binding Edit, Source={StaticResource Provider}, Mode=OneWay}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.EditRuleCommand }"
- Style="{StaticResource PrimaryColorButtonStyle}"
- Grid.Column="4">
- <Button.Content>
- <Image Source="/Resources/Images/edit.png" Width="21" Height="21"></Image>
- </Button.Content>
- </Button>
- <Button CommandParameter="{Binding}" Style="{StaticResource PrimaryColorDarkButtonStyle}" Grid.Column="5" Margin="0,0,5,0"
- ToolTip="{Binding Complete, Source={StaticResource Provider}, Mode=OneWay}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.ViewRuleCommand}">
- <Button.Content>
- <Image Source="/Resources/Images/statusApprovedWhite.png" Width="20" Height="16"></Image>
- </Button.Content>
- </Button>
- <Button CommandParameter="{Binding Id}" Style="{StaticResource AlternativeColorButtonStyle}" Grid.Column="6"
- ToolTip="{Binding Remove, Source={StaticResource Provider}, Mode=OneWay}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.RemoveRuleCommand}">
- <Button.Content>
- <Image Source="/Resources/Images/cancel.png" Width="18" Height="18"></Image>
- </Button.Content>
- </Button>
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="ListPagesTemplate">
- <RadioButton Content="{Binding Page}" IsChecked="{Binding IsCurrentPage, Mode=TwoWay}" IsEnabled="{Binding IsClickable}"
- GroupName="Pages" Template="{StaticResource RadioButtonNumberOfPage}"></RadioButton>
- </DataTemplate>
- <DataTemplate x:Key="AttachmentsTemplate">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition Width="50"></ColumnDefinition>
- <ColumnDefinition Width="50"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" VerticalAlignment="Center" >
- <Run Style="{StaticResource ListTextSmallDark}" Text="{Binding Name}"></Run>
- </TextBlock>
- <Button Visibility="{Binding TravelAttachmentId, Converter={StaticResource IdToVisibilityConverter}}" Grid.Column="1"
- ToolTip="{Binding DownloadAttachment, Source={StaticResource Provider}, Mode=OneWay}"
- CommandParameter="{Binding}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.DownloadAttachmentCommand}"
- Style="{StaticResource TransparentButtonStyle}">
- <Image Stretch="None" Source="/Resources/Images/file-download.png" ></Image>
- </Button>
- <Button Grid.Column="2" Style="{StaticResource TransparentButtonStyle}" Height="50"
- ToolTip="{Binding RemoveAttachment, Source={StaticResource Provider}, Mode=OneWay}"
- CommandParameter="{Binding}"
- Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.RemoveAttachmentCommand}">
- <Image Stretch="None" Source="/Resources/Images/file-delete.png" ></Image>
- </Button>
- </Grid>
- </DataTemplate>
- <DataTemplate x:Key="TestingPointTemplate">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Name="名称"></ColumnDefinition>
- <ColumnDefinition Name="编码"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" VerticalAlignment="Center" >
- <Run Style="{StaticResource ListTextSmallDark}" Text="{Binding UniformCode}"></Run>
- </TextBlock>
- <TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="15 0 0 0" >
- <Run Style="{StaticResource ListTextSmallDark}" Text="{Binding Name}"></Run>
- </TextBlock>
- </Grid>
- </DataTemplate>
- <Style x:Key="AlternativeColorItemStyle" TargetType="ListBoxItem" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="bdr_main" Background="{StaticResource module-alternative-color-brush}">
- <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Content" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="bdr_main" Property="Background" Value="{StaticResource module-alternative-color-over-brush}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Margin" Value="2 2 2 2"/>
- <Setter Property="MaxHeight" Value="30" />
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="Foreground" Value="{StaticResource list-info-font-color-light-brush}"/>
- </Style>
- </ResourceDictionary>
|