|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747 |
- <UserControl x:Class="FryPot_DosingSystem.View.SqliteDataView"
- 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"
- xmlns:local="clr-namespace:FryPot_DosingSystem.View"
- xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
- <UserControl.DataContext>
- <vm:SqliteDataViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <Style x:Key="dataGrid" TargetType="DataGrid" >
- <Setter Property="HorizontalGridLinesBrush" Value="#FF2AB2E7"/>
- <Setter Property="VerticalGridLinesBrush" Value="#FF2AB2E7"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="#FF2AB2E7"/>
- <Setter Property="CanUserResizeColumns" Value="False"/>
- <Setter Property="HeadersVisibility" Value="Column"/>
- <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
- <Setter Property="VerticalScrollBarVisibility" Value="Hidden"/>
- </Style>
- <Style x:Key="ColumHeaderStyle" TargetType="DataGridColumnHeader">
- <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Background" Value="#FF2AB2E7"></Setter>
- <Setter Property="Foreground" Value="white"></Setter>
- <Setter Property="BorderThickness" Value="0.6"></Setter>
- <Setter Property="BorderBrush" Value="White"></Setter>
- <Setter Property="Height" Value="30"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontWeight" Value="Heavy"/>
- <Setter Property="Margin" Value="-1,-1,-1,-1" />
- </Style>
-
- <Style x:Key="rowStyle" TargetType="DataGridRow">
- <Setter Property="Height" Value="35"/>
- <Setter Property="Foreground" Value="#FF2AB2E7"/>
- <Style.Triggers>
- <Trigger Property="AlternationIndex" Value="0">
- <Setter Property="Background" Value="Transparent" />
- </Trigger>
- <Trigger Property="AlternationIndex" Value="1">
- <Setter Property="Background" Value="Transparent" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="#000066" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="textboxStyle" TargetType="TextBox">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="#FF2AB2E7"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="CaretBrush" Value="LightBlue"/>
- <Style.Triggers>
- <Trigger Property="IsFocused" Value="True">
- <Setter Property="Cursor" Value="Arrow"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="cellStyle" TargetType="DataGridCell">
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground"
- Value="#FF2AB2E7"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="false">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground"
- Value="#FF2AB2E7"/>
- </Trigger>
-
- </Style.Triggers>
- </Style>
- <Style x:Key="dgCellstyle" TargetType="TextBlock">
- <Setter Property="HorizontalAlignment" Value="Center"></Setter>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="FontSize" Value="16"/>
- </Style>
- <Style x:Key="PickerStyle" TargetType="{x:Type DatePicker}">
- <Setter Property="Foreground" Value="#FF2AB2E7" />
- <Setter Property="IsTodayHighlighted" Value="True" />
- <Setter Property="SelectedDateFormat" Value="Short" />
- <Setter Property="Padding" Value="2" />
- <Setter Property="BorderThickness" Value="2" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <!-- Set CalendarStyle to DatePickerCalendarStyle. -->
- <Setter Property="CalendarStyle" Value="{DynamicResource DatePickerCalendarStyle}" />
- <Setter Property="Width" Value="130" />
- <Setter Property="FontSize" Value="12" />
- <!--<Setter Property="Height" Value="30" />-->
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DatePicker}">
- <Border
- x:Name="br"
- Padding="{TemplateBinding Padding}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <Grid
- x:Name="PART_Root"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Button
- x:Name="PART_Button"
- Grid.Column="1"
- Height="20"
- Margin="3,0,3,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Background="Transparent"
- Focusable="False"
- Foreground="{TemplateBinding Foreground}"
- Style="{StaticResource DropDownButtonStyle}" />
- <DatePickerTextBox
- x:Name="PART_TextBox"
- Grid.Column="0"
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- Foreground="{TemplateBinding Foreground}"
- Style="{StaticResource DatePickerTextBoxStyle}"
- Text="{TemplateBinding Text}" />
- <Grid
- x:Name="PART_DisabledVisual"
- Grid.Row="0"
- Grid.Column="0"
- Grid.ColumnSpan="2"
- IsHitTestVisible="False"
- Opacity="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Rectangle
- Grid.Row="0"
- Grid.Column="0"
- Fill="#A5FFFFFF"
- RadiusX="1"
- RadiusY="1" />
- <Rectangle
- Grid.Row="0"
- Grid.Column="1"
- Width="19"
- Height="18"
- Margin="3,0,3,0"
- Fill="#A5FFFFFF"
- RadiusX="1"
- RadiusY="1" />
- <Popup
- x:Name="PART_Popup"
- AllowsTransparency="True"
- Placement="Bottom"
- PlacementTarget="{Binding ElementName=br}"
- PopupAnimation="Slide"
- StaysOpen="False" />
- </Grid>
- </Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="PART_DisabledVisual"
- Storyboard.TargetProperty="Opacity"
- To="1"
- Duration="0" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="br" Property="BorderBrush" Value="#3aa7f3" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>
- <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="AllowDrop" Value="true"/>
- <Setter Property="MinWidth" Value="0"/>
- <Setter Property="MinHeight" Value="0"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="Transparent" Offset="0.0"/>
- <GradientStop Color="Transparent" Offset="1.0"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
- <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF2AB2E7"/>
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="Transparent"/>
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
- <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
- <LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="Transparent" Offset="0.0"/>
- <GradientStop Color="Transparent" Offset="1.0"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
- <SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
- <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="Transparent"/>
- <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
- <LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="Transparent" Offset="0.0"/>
- <GradientStop Color="Transparent" Offset="1.0"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
- <LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="#FFDAECFC" Offset="0.0"/>
- <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
- <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
- <LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="#FFDAEBFC" Offset="0.0"/>
- <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
- </LinearGradientBrush>
- <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
- <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
- <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="IsTabStop" Value="false"/>
- <Setter Property="Focusable" Value="false"/>
- <Setter Property="ClickMode" Value="Press"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border x:Name="templateRoot" Background="{StaticResource ComboBox.Static.Background}" BorderBrush="{StaticResource ComboBox.Static.Border}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
- <Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
- <Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
- </MultiDataTrigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
- </Trigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
- </MultiDataTrigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
- </Trigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
- </MultiDataTrigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
- </Trigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
- </MultiDataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
- <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
- </Grid.ColumnDefinitions>
- <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
- <Border x:Name="dropDownBorder" Background="Transparent" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
- <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
- <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
- </Canvas>
- <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Grid>
- </ScrollViewer>
- </Border>
- </theme:SystemDropShadowChrome>
- </Popup>
- <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
- <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
- <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Opacity" TargetName="border" Value="0.56"/>
- </Trigger>
- <Trigger Property="IsKeyboardFocusWithin" Value="true">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
- <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
- <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
- <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
- <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
- <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
- </Grid.ColumnDefinitions>
- <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
- <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
- <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
- <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
- </Canvas>
- <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Grid>
- </ScrollViewer>
- </Border>
- </theme:SystemDropShadowChrome>
- </Popup>
- <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
- <ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
- <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
- <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
- <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
- <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
- <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
- <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
- <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
- <Setter Property="Padding" Value="6,3,5,3"/>
- <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
- <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
- <Style.Triggers>
- <Trigger Property="IsEditable" Value="true">
- <Setter Property="IsTabStop" Value="false"/>
- <Setter Property="Padding" Value="2"/>
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.1*"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <!--<DatePicker Margin="50,0" Height="35" Style="{StaticResource PickerStyle}" SelectedDate="{Binding SelectedDate}"></DatePicker>
- <ComboBox Style="{DynamicResource ComboBoxStyle1}" ItemsSource="{Binding list}" Height="35" Width="150" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="18" Foreground="#FF2AB2E7" SelectedValue="{Binding cboSelectedValue}" Margin="0,0,50,0"></ComboBox>-->
- <Button Width="150" Height="35" Content="查询" FontSize="20" Foreground="#FF2AB2E7" Background="Transparent" BorderBrush="#FF2AB2E7" BorderThickness="1" Margin="0,0,10,0" Command="{Binding SelectCommand}"></Button>
- </StackPanel>
- <DataGrid Grid.Row="1" x:Name="fryPot" ItemsSource="{Binding Status}" GridLinesVisibility="All" Background="Transparent" LoadingRow="fryPot_LoadingRow"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" IsReadOnly="True" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方名称" Binding="{Binding RecipeName}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- </DataGrid.Columns>
- </DataGrid>
- <!--<DataGrid Grid.Row="1" x:Name="fryOne" Visibility="{Binding fryOneDataVisible}" ItemsSource="{Binding StatusOne}" GridLinesVisibility="All" Background="Transparent"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- --><!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>--><!--
- </DataGrid.Columns>
- </DataGrid>-->
- <DataGrid x:Name="fryTwo" Grid.Row="1" Visibility="{Binding fryTwoDataVisible}" ItemsSource="{Binding StatusTwo}" GridLinesVisibility="All" Background="Transparent"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- </DataGrid.Columns>
- </DataGrid>
- <DataGrid x:Name="fryThree" Grid.Row="1" Visibility="{Binding fryThreeDataVisible}" ItemsSource="{Binding StatusThree}" GridLinesVisibility="All" Background="Transparent"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- </DataGrid.Columns>
- </DataGrid>
- <DataGrid x:Name="fryFour" Grid.Row="1" Visibility="{Binding fryFourDataVisible}" ItemsSource="{Binding StatusFour}" GridLinesVisibility="All" Background="Transparent"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- </DataGrid.Columns>
- </DataGrid>
- <DataGrid x:Name="fryFive" Grid.Row="1" Visibility="{Binding fryFiveDataVisible}" ItemsSource="{Binding StatusFive}" GridLinesVisibility="All" Background="Transparent"
- AutoGenerateColumns="False" IsReadOnly="True" Style="{StaticResource dataGrid}"
- ColumnHeaderStyle="{StaticResource ColumHeaderStyle}" RowStyle="{StaticResource rowStyle}" CellStyle="{StaticResource cellStyle}">
- <DataGrid.Columns>
- <DataGridTemplateColumn IsReadOnly="True" Width="0.1*" Header="ID">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Id}" IsReadOnly="False" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Width="0.2*" Header="温度" Binding="{Binding Temperature}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="火力" Binding="{Binding HotPower}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="搅拌速度" Binding="{Binding Speed}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="炒锅载重" Binding="{Binding FryPotWeight}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="配方用油量" Binding="{Binding OilCapacity}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="总用油量" Binding="{Binding TotalOilCapactiy}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="产量" Binding="{Binding TotalProduct}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <DataGridTextColumn Width="0.2*" Header="时间" Binding="{Binding Time}" ElementStyle="{StaticResource dgCellstyle }">
- </DataGridTextColumn>
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding PlcAddress}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- <!--<DataGridTemplateColumn IsReadOnly="False" Width="0.45*" Header="地址长度">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Length}" Style="{StaticResource textboxStyle}"></TextBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>-->
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </UserControl>
|