终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

38 rindas
2.1 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.Academy.CustomControls.ValveWithCommandState"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:bpa="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.Academy.CustomControls"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="32"
  9. d:DesignWidth="32" mc:Ignorable="d">
  10. <UserControl.Resources>
  11. <Style x:Key="BaseHandValveStyle" TargetType="bpa:HandValve">
  12. <Setter Property="Width" Value="32" />
  13. <Setter Property="Height" Value="32" />
  14. <Setter Property="HorizontalAlignment" Value="Center" />
  15. <Setter Property="VerticalAlignment" Value="Center" />
  16. </Style>
  17. <Style x:Key="CommandStateStyle" TargetType="TextBlock">
  18. <Setter Property="Height" Value="16" />
  19. <Setter Property="HorizontalAlignment" Value="Center" />
  20. <Setter Property="VerticalAlignment" Value="Center" />
  21. <Setter Property="FontSize" Value="16" />
  22. <Setter Property="Margin" Value="0,3,6,0" />
  23. <Setter Property="TextAlignment" Value="Center" />
  24. <Setter Property="Text" Value="⬛" />
  25. </Style>
  26. </UserControl.Resources>
  27. <Grid>
  28. <bpa:HandValve
  29. EdgeColor="{Binding Path=EdgeColor, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:ValveWithCommandState}}}"
  30. OpenEnable="{Binding Path=OpenEnable, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:ValveWithCommandState}}}"
  31. Style="{StaticResource BaseHandValveStyle}" />
  32. <TextBlock
  33. d:Foreground="Red"
  34. Foreground="{Binding Path=CommandColor, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:ValveWithCommandState}}}"
  35. Style="{StaticResource CommandStateStyle}" />
  36. </Grid>
  37. </UserControl>