PVStationBlock.xaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <UserControl x:Class="NEIntelligentControl2.Views.Matrix.PVStationBlock"
  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:NEIntelligentControl2.Views.Matrix"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <UserControl.Resources>
  10. <Style x:Key="TitleSytle" TargetType="TextBlock">
  11. <Setter Property="Background" Value="DarkGray"/>
  12. <Setter Property="Padding" Value="14,3"/>
  13. </Style>
  14. </UserControl.Resources>
  15. <Border Margin="0,1" BorderBrush="#FF575757" BorderThickness="1">
  16. <Grid Margin="1">
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="Auto"/>
  19. <RowDefinition/>
  20. </Grid.RowDefinitions>
  21. <StackPanel Orientation="Horizontal" Background="#FF99B4D1">
  22. <TextBlock Background="SeaShell" Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=StationInfo.FullName}" MinWidth="100" Style="{StaticResource TitleSytle}"/>
  23. <TextBlock Text="接入台数" Style="{StaticResource TitleSytle}"/>
  24. <TextBlock Background="White" Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountTotal}" Style="{StaticResource TitleSytle}"/>
  25. <TextBlock Text="并网" Style="{StaticResource TitleSytle}"/>
  26. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountConnect}" Style="{StaticResource TitleSytle}" Background="#FFC8EAFF"/>
  27. <TextBlock Text="待机" Style="{StaticResource TitleSytle}"/>
  28. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountStandby}" Style="{StaticResource TitleSytle}" Background="#FFCFF1E8"/>
  29. <TextBlock Text="故障" Style="{StaticResource TitleSytle}"/>
  30. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountFault}" Style="{StaticResource TitleSytle}" Background="#FFDB3333"/>
  31. <TextBlock Text="维护" Style="{StaticResource TitleSytle}"/>
  32. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountMaintain}" Style="{StaticResource TitleSytle}" Background="#FFFF720E"/>
  33. <TextBlock Text="限电" Style="{StaticResource TitleSytle}"/>
  34. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountPowerRestriction}" Style="{StaticResource TitleSytle}" Background="#FF7E7935"/>
  35. <TextBlock Text="离线" Style="{StaticResource TitleSytle}"/>
  36. <TextBlock Text="{Binding RelativeSource={ RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=CountOffline}" Background="#FFF4F4F4" Style="{StaticResource TitleSytle}"/>
  37. </StackPanel>
  38. <UniformGrid x:Name="_UGMain" Grid.Row="1" Columns="18" MinHeight="70"/>
  39. </Grid>
  40. </Border>
  41. </UserControl>