DynAreaProfile.xaml 9.73 KB
Newer Older
1
<UserControl x:Class="FLY.Thick.BlowingScan.UI.Client.UiModule.DynAreaProfile"
2 3 4 5
             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" 
6
             xmlns:local="clr-namespace:FLY.Thick.BlowingScan.UI.Client.UiModule"
7
             xmlns:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing"
8 9 10 11 12
             mc:Ignorable="d" d:DesignWidth="250">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
13
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
14 15 16 17 18 19 20 21 22 23
            </ResourceDictionary.MergedDictionaries>

            <Style TargetType="TextBlock" x:Key="TextBlockStyle_ItemHeader">
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="FontFamily" Value="YouYuan"/>
                <Setter Property="FontSize" Value="12"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="Foreground" Value="#FF3B3B3B"/>
                <Setter Property="Margin" Value="5,0"/>
            </Style>
24
            <blowing_common:BlowingFixProfileParam x:Key="profile_param" />
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
        </ResourceDictionary>
    </UserControl.Resources>
    <Button Click="button_profile_click" Style="{StaticResource ButtonStyle_empty}" d:DataContext="{StaticResource profile_param}">
        <Border  Style="{StaticResource BorderStyle_module}" Name="Border_Profile">
            <StackPanel Margin="2">
                <Grid Margin="2">
                    <Rectangle Name="rectangle_profile" Fill="{StaticResource Color_theme_activity}" Height="24"/>
                    <Viewbox MaxWidth="{Binding ActualWidth, ElementName=rectangle_profile}" MaxHeight="24" >
                        <TextBlock Text="{Binding PName}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
                    </Viewbox>
                </Grid>
                <Grid Margin="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="182*" />
                        <ColumnDefinition Width="auto" />
                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="A" Style="{StaticResource TextBlockStyle_ItemHeader}" />
                        <TextBlock Text="{Binding K, StringFormat={}{0:F3}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" />
                    </StackPanel>
                </Grid>
                <StackPanel Orientation="Vertical">
                    <Grid Margin="2" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="182*" />
                            <ColumnDefinition Width="auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Margin="2">
                            <TextBlock Text="膜宽" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding FilmWidth}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
                            <TextBlock Text="膜边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding FilmPosH}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <StackPanel.Style>
                        <Style TargetType="StackPanel">
                            <Setter Property="Visibility" Value="Collapsed"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding MMode}" Value="Normal">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </StackPanel.Style>
                </StackPanel>
                <StackPanel Orientation="Vertical">
                    <Grid Margin="2" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="182*" />
                            <ColumnDefinition Width="auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Margin="2">
                            <TextBlock Text="膜宽" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding FilmWidth}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
                            <TextBlock Text="膜边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding FilmPosH}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <Grid Margin="2" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="182*" />
                            <ColumnDefinition Width="auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Margin="2">
                            <TextBlock Text="插边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding BagFold0}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
                            <TextBlock Text="插边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
                            <StackPanel Orientation="Horizontal" Margin="5,0">
                                <TextBlock Text="{Binding BagFold1}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <StackPanel.Style>
                        <Style TargetType="StackPanel">
                            <Setter Property="Visibility" Value="Collapsed"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding MMode}" Value="Bag">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </StackPanel.Style>
                </StackPanel>

            </StackPanel>
        </Border>
    </Button>

</UserControl>