TempAreaPanel.xaml 4.38 KB
Newer Older
1 2 3 4 5
<UserControl x:Class="FLY.IBC.UI.Client.UiModule.TempAreaPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
潘栩锋's avatar
潘栩锋 committed
6
             mc:Ignorable="d" d:DesignWidth="960" d:DesignHeight="890"  Unloaded="UserControl_Unloaded" >
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
    <!--1920*1080 下图表区  1600 * 954
1280*1024 下图表区  960 * 890
1388*768 下图表区  1060 * 634-->
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="TempAreaPanelStyle.xaml"/>
                <ResourceDictionary Source="UcTcStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid d:DataContext="{StaticResource ibcServiceUt}">
        <ItemsControl ItemsSource="{Binding TAreas}" >
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Columns="1"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <Button Style="{StaticResource Styles.Button.Empty}" Tag="{Binding .}" Click="btnTAreaClick">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="auto"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Border Style="{StaticResource Styles.Module.Border}" Background="{StaticResource Color_background}" CornerRadius="5,0,0,5" Width="100">
                                <TextBlock Text="{Binding Number}" FontSize="50" Foreground="{StaticResource Color_title}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            </Border>
                            <UniformGrid Columns="6" Grid.Column="1">
                                <UniformGrid.Resources>
                                    <Style TargetType="ContentControl">
                                        <Setter Property="Margin" Value="{StaticResource ControlMargin}"/>
                                        <Setter Property="MinWidth" Value="150"/>
                                        <Setter Property="MinHeight" Value="116"/>
                                    </Style>
                                </UniformGrid.Resources>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[0]}"/>
                                </Viewbox>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[1]}"/>
                                </Viewbox>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[2]}"/>
                                </Viewbox>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[3]}"/>
                                </Viewbox>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[4]}"/>
                                </Viewbox>
                                <Viewbox Stretch="Uniform" StretchDirection="DownOnly">
                                    <ContentControl ContentTemplate="{StaticResource TcTemplate}" Content="{Binding Temperatures[5]}"/>
                                </Viewbox>
                            </UniformGrid>
                        </Grid>
                    </Button>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</UserControl>