TempControl.xaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <UserControl x:Class="CyberX8_Themes.UserControls.TempControl"
  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. mc:Ignorable="d" x:Name="temp"
  7. d:DesignHeight="450" d:DesignWidth="800">
  8. <Viewbox Stretch="Fill">
  9. <Canvas Width="150" Height="100" Canvas.Left="778" Canvas.Top="476" HorizontalAlignment="Center" VerticalAlignment="Top">
  10. <Border Grid.Row="1" BorderThickness="1" BorderBrush="Blue" Background="#0000CD" HorizontalAlignment="Center" VerticalAlignment="Center" Width="150" Margin="0,5" CornerRadius="4">
  11. <Grid Height="90">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="108*"/>
  14. <ColumnDefinition Width="41*"/>
  15. </Grid.ColumnDefinitions>
  16. <Rectangle Fill="#0000CD" Margin="3,3,3,3" RadiusX="2" RadiusY="2" Grid.ColumnSpan="2"/>
  17. <Grid Margin="0,5,0,5" Grid.ColumnSpan="2">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="15"/>
  20. <RowDefinition Height="50"/>
  21. <RowDefinition Height="12"/>
  22. </Grid.RowDefinitions>
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="90"/>
  25. <ColumnDefinition />
  26. </Grid.ColumnDefinitions>
  27. <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="Temp Controller" FontFamily="Arial" FontSize="12" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  28. <Border Grid.Row="1" Height="40" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="5,0,5,0" BorderBrush="Gray" Background="DimGray" >
  29. <Rectangle Width="128" Height="30" Fill="Black" Margin="0,0,0,0" RadiusX="0.5" RadiusY="0.5">
  30. <Rectangle.Effect>
  31. <DropShadowEffect Direction="270" BlurRadius="0" ShadowDepth="1"/>
  32. </Rectangle.Effect>
  33. </Rectangle>
  34. </Border>
  35. <TextBlock Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding ElementName=temp,Path=TempValue,StringFormat=\{0:F1\} ℃}" FontFamily="Arial" FontWeight="ExtraBold" FontSize="14" Foreground="Lime" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  36. <Border Grid.Row="2" Grid.Column="0" Background="Black" BorderThickness="1" Margin="5,0,15,-3">
  37. <TextBlock Text="{Binding ElementName=temp,Path=Status}" FontFamily="Arial" FontSize="12" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  38. </Border>
  39. <Border Grid.Row="2" Background="Black" BorderThickness="1" Margin="79,0,5,-3" Grid.ColumnSpan="2">
  40. <TextBlock Text="{Binding ElementName=temp,Path=DisableStatus}" FontFamily="Arial" FontSize="12" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Height="12"/>
  41. </Border>
  42. </Grid>
  43. </Grid>
  44. </Border>
  45. </Canvas>
  46. </Viewbox>
  47. </UserControl>