DamageRangeControl.xaml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <UserControl x:Class="SWRIS.Controls.DamageRangeControl"
  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:local="clr-namespace:SWRIS.Controls"
  7. mc:Ignorable="d"
  8. d:DesignHeight="50" d:DesignWidth="1100">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*"/>
  12. <RowDefinition Height="15"/>
  13. </Grid.RowDefinitions>
  14. <Border CornerRadius="5" Grid.Row="0">
  15. <Border.Background>
  16. <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
  17. <GradientStop Color="#3300FF78" Offset="0"/>
  18. <GradientStop Color="#33FF9600" Offset="0.33"/>
  19. <GradientStop Color="#33FF0000" Offset="0.66"/>
  20. <GradientStop Color="#33FF008A" Offset="1"/>
  21. </LinearGradientBrush>
  22. </Border.Background>
  23. <UniformGrid Columns="6">
  24. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  25. <Run Text="轻微"/>
  26. <Run Text="{Binding MildCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  27. </TextBlock>
  28. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  29. <Run Text="轻度"/>
  30. <Run Text="{Binding LightCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  31. </TextBlock>
  32. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  33. <Run Text="中度"/>
  34. <Run Text="{Binding ModerateCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  35. </TextBlock>
  36. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  37. <Run Text="较重"/>
  38. <Run Text="{Binding SevereCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  39. </TextBlock>
  40. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  41. <Run Text="严重"/>
  42. <Run Text="{Binding CriticalCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  43. </TextBlock>
  44. <TextBlock FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Center">
  45. <Run Text="超限"/>
  46. <Run Text="{Binding ExtremeCount, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
  47. </TextBlock>
  48. </UniformGrid>
  49. </Border>
  50. <UniformGrid Columns="6" Margin="0,5" Grid.Row="1">
  51. <Rectangle Height="5" Fill="#00FF78" RadiusX="2.5" RadiusY="2.5" Margin="0,0,3,0"/>
  52. <Rectangle Height="5" Fill="#FFF000" RadiusX="2.5" RadiusY="2.5" Margin="3,0,3,0"/>
  53. <Rectangle Height="5" Fill="#FF9400" RadiusX="2.5" RadiusY="2.5" Margin="3,0,3,0"/>
  54. <Rectangle Height="5" Fill="#FF6C00" RadiusX="2.5" RadiusY="2.5" Margin="3,0,3,0"/>
  55. <Rectangle Height="5" Fill="#FF0000" RadiusX="2.5" RadiusY="2.5" Margin="3,0,3,0"/>
  56. <Rectangle Height="5" Fill="#FF008A" RadiusX="2.5" RadiusY="2.5" Margin="3,0,0,0"/>
  57. </UniformGrid>
  58. </Grid>
  59. </UserControl>