BaseTemperature.xaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <UserControl x:Class="SummaryModule.Controls.BaseTemperature"
  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:SummaryModule.Controls"
  7. mc:Ignorable="d"
  8. x:Name="This"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="auto"/>
  13. <RowDefinition Height="0"/>
  14. <RowDefinition />
  15. </Grid.RowDefinitions>
  16. <Grid>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition/>
  19. <ColumnDefinition Width="8"/>
  20. <ColumnDefinition/>
  21. </Grid.ColumnDefinitions>
  22. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Zone</TextBlock>
  23. <TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center">Actual (℃)</TextBlock>
  24. </Grid>
  25. <ItemsControl Grid.Row="2" ItemsSource="{Binding ElementName=This, Path=TempCollection.Values}">
  26. <ItemsControl.ItemTemplate>
  27. <DataTemplate>
  28. <Grid Height="26" Margin="0,6">
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition/>
  31. <ColumnDefinition Width="8"/>
  32. <ColumnDefinition/>
  33. </Grid.ColumnDefinitions>
  34. <Border Grid.Column="0" Background="White" CornerRadius="4">
  35. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Name}"/>
  36. </Border>
  37. <Border Grid.Column="2" Background="White" CornerRadius="4">
  38. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Temp, StringFormat=0.0}"/>
  39. </Border>
  40. </Grid>
  41. </DataTemplate>
  42. </ItemsControl.ItemTemplate>
  43. <ItemsControl.ItemsPanel>
  44. <ItemsPanelTemplate>
  45. <StackPanel />
  46. </ItemsPanelTemplate>
  47. </ItemsControl.ItemsPanel>
  48. </ItemsControl>
  49. </Grid>
  50. </UserControl>