<UserControl
x:Class="MECF.Framework.UI.Client.CenterViews.Editors.Recipe.RecipeEditorDetailView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
xmlns:converters1="clr-namespace:MECF.Framework.UI.Client.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dgExtension="clr-namespace:RecipeEditorLib.DGExtension"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:micro="clr-namespace:Caliburn.Micro"
xmlns:Converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter"
d:DesignHeight="768"
d:DesignWidth="1200"
Background="White"
mc:Ignorable="d">
<UserControl.Resources>
<converters:TrimFolderConverter1 x:Key="TrimFolderConverter1"/>
<converters:StringPreservesLengthConvertor x:Key="stringPreservesLengthConvertor"/>
<converters:BorderBrushCustomConvertor x:Key="BorderBrushCustomConvertor"/>
<converters:BorderThicknessCustomConvertor x:Key="BorderThicknessCustomConvertor"/>
<converters1:RecipeTypeToConverter x:Key="recipeTypeToConverter"/>
<converters1:RecipeConfigLabelBackgroundCoverter x:Key="recipeConfigLabelBackgroundCoverter"/>
<ControlTemplate x:Key="TemplateStep">
<Grid>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
Foreground="Black"
Text="{Binding Value}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="ParamTemplate">
<Grid Margin="0,5">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="16"
Text="{Binding DisplayName}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="ParamTemplateByControlName">
<Grid Margin="0,5">
<TextBlock
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="16"
Text="{Binding ControlName}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplateText">
<Grid>
<controls:EditTextBlock
AllowBackgroundChange="True"
CanInputSpace="False"
Foreground="Black"
IsEnabled="{Binding IsEnabled}"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplateNumber">
<Grid>
<controls:EditTextBlock
Padding="5,3"
AllowBackgroundChange="True"
EditBoxMode="Decimal"
Foreground="Black"
IsEnabled="{Binding IsEnabled}"
MaxValue="{Binding Maximun}"
MinValue="{Binding Minimun}"
RefreshControl="{Binding RefreshControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ToolTip="{Binding ToolText}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplateCombox">
<Grid>
<controls:ComboTextBlock
AllowBackgroundChange="True"
Background="{Binding LoopBackground}"
Foreground="Black"
IsEditable="{Binding IsEditable}"
IsEnabled="{Binding IsEnabled}"
IsLoopItem="{Binding IsLoopItem}"
ItemsSource="{Binding Options}"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplateRecipeSelection">
<Grid>
<TextBlock
Foreground="White"
IsEnabled="{Binding IsEnabled}"
Text="{Binding Value}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<micro:ActionMessage MethodName="PopSetting">
<micro:Parameter Value="{Binding Name}"/>
<micro:Parameter Value="{Binding}"/>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplateRecipeSelection2">
<Grid>
<TextBlock
Height="25"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource stringPreservesLengthConvertor}, ConverterParameter=30}"
Visibility="{Binding Visible}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<micro:ActionMessage MethodName="SelectRecipe">
<micro:Parameter Value="{Binding}"/>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="TemplatePopSetting">
<Grid>
<!-- Background="{Binding Value, Converter={StaticResource recipeConfigLabelBackgroundCoverter}}" -->
<TextBlock
Height="25"
IsEnabled="{Binding IsEnabled}"
Text="{Binding Value}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<micro:ActionMessage MethodName="PopSetting">
<micro:Parameter Value="{Binding Name}"/>
<micro:Parameter Value="{Binding}"/>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
</Grid>
</ControlTemplate>
<Converter:GetRecipeConfigButtonConverter x:Key="getRecipeConfigButtonConverter"/>
</UserControl.Resources>
<Grid Margin="10,0">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button
Width="60"
Margin="10,0"
Command="{Binding PreCommand}"
Content="Pre"/>
<Border
Grid.Column="2"
Margin="10,2,10,0"
Style="{DynamicResource Sub_Menu_BarStyle}">
<Grid Width="190">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Gray" BorderThickness="1">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="Recipe Status"/>
</Border>
<Border Grid.Column="1"
BorderBrush="Gray"
BorderThickness="0,1,1,1">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValid, Mode=OneWay}" Value="Invalid">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding IsValid, Mode=OneWay}"/>
</Border>
</Grid>
</Border>
<Button Grid.Column="3"
Width="95"
Margin="-10.5,0,15,0"
Command="{Binding CheckCommand}"
Content="ValidCheck"/>
<UniformGrid Grid.Column="4" Rows="1">
<Button
Command="{Binding AppendCommand}"
Content="Append"
IsEnabled="{Binding BtnIsNanoAEnabled}"/>
<Button
Command="{Binding InsertCommand}"
CommandParameter="{Binding ElementName=dgCustom, Path=SelectedItem}"
Content="Insert"
IsEnabled="{Binding BtnIsNanoAEnabled}"/>
<Button
Command="{Binding CopyCommand}"
CommandParameter="{Binding ElementName=dgCustom, Path=SelectedItems}"
Content="Copy"
IsEnabled="{Binding BtnIsNanoAEnabled}"/>
<Button
Command="{Binding PasteCommand}"
CommandParameter="{Binding ElementName=dgCustom, Path=SelectedItem}"
Content="Paste"
IsEnabled="{Binding BtnIsNanoAEnabled}"/>
<Button Command="{Binding ReloadCommand}" Content="Reload"/>
<Button
x:Name="BtnSaveRecipe"
Command="{Binding SaveCommand}"
Content="Save"/>
<Button
Command="{Binding DeleteCommand}"
CommandParameter="{Binding ElementName=dgCustom, Path=SelectedItems}"
Content="Delete"/>
</UniformGrid>
</Grid>
<TabControl Margin="0,5,0,-350" Grid.Row="1">
<TabItem Header="Header">
<StackPanel>
<Grid x:Name="gridHeader" HorizontalAlignment="Left" IsEnabled="{Binding IsPermission}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="280"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="{Binding TemperatureHeight}"/>
</Grid.RowDefinitions>
<Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Name" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<controls:TextBoxEx AllowBackgroundChange="False" IsEnabled="False" Text="{Binding RecipeTable.RecipeData.Name}" TextWrapping="Wrap" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="0" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.Index,UpdateSourceTrigger=PropertyChanged}"/>
</Border>
<Border Grid.Row="1" Grid.Column="0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="RecipePMGroup" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<controls:ComboTextBlock Height="30" ItemsSource="{Binding AllRecipePMGroup}" TextSaved="{Binding RecipeTable.RecipeData.RecipePMGroup.IsSaved,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding RecipeTable.RecipeData.RecipePMGroup.Value,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Stretch" IsEnabled="{Binding EnableHeader}" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="1" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
</Border>
<Border Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Description" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<controls:TextBoxEx Text="{Binding RecipeTable.RecipeData.Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextSaved="{Binding RecipeTable.RecipeData.IsSavedDesc, Mode=TwoWay}" IsEnabled="{Binding EnableHeader}" TextWrapping="Wrap" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="2" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
</Border>
<Border Grid.Row="3" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Chamber Type" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock IsEnabled="False" Text="{Binding RecipeTable.RecipeData.RecipeChamberType}" TextWrapping="Wrap" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="3" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
</Border>
<Border Grid.Row="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Format Version" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.RecipeVersion}" TextWrapping="Wrap" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="4" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
</Border>
<Border Grid.Row="5" Grid.Column="0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Create" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="5" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.Creator}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="5" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.CreateTime, StringFormat=yyyy/MM/dd HH:mm:ss}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="6" Grid.Column="0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Revise" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="6" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.Revisor}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" Width="120"/>
</Border>
<Border Grid.Row="6" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.ReviseTime, StringFormat=yyyy/MM/dd HH:mm:ss}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="140"/>
</Border>
<Border Grid.Row="7" Grid.Column="0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
<TextBlock Text="Temperature" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="7" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<controls:TextBoxEx Text="{Binding RecipeTable.RecipeData.Temperature, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableHeader}" TextWrapping="Wrap" VerticalAlignment="Stretch" MinWidth="100" Width="Auto"/>
</Border>
<Border Grid.Row="7" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
<TextBlock Text="{Binding RecipeTable.RecipeData.Temperature}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="140"/>
</Border>
</Grid>
<DataGrid Grid.Row="1" AlternationCount="2" HorizontalAlignment="Left"
CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0" RowHeight="38"
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
ItemsSource="{Binding RecipeTable.RecipeData.ConfigItems}" Margin="0,5,0,0" IsEnabled="{Binding IsPermission}">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Style.Setters>
<Setter Property="Height" Value="40"/>
</Style.Setters>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="Config Item" MinWidth="300">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding DisplayName}" Margin="5,0,0,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Value" MinWidth="220">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid ToolTip="{Binding FileName}" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<controls:TextBoxEx Visibility="{Binding TextBoxVisibility}"
TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsEnabled}"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource TrimFolderConverter1}}" FontSize="14" Width="Auto" VerticalContentAlignment="Top"/>
<Button Grid.Column="1" Visibility="{Binding ButtonVisibility}" Width="70" Height="30">
<TextBlock FontSize="14" Text="{Binding Converter={StaticResource getRecipeConfigButtonConverter}}" Foreground="White" FontFamily="Arial,SimSun"/>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="SelectRecipe">
<micro:Parameter Value="{Binding}" />
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<controls:ComboTextBlock Grid.ColumnSpan="2" Foreground="Black" IsEnabled="{Binding IsEnabled}" Visibility="{Binding ComboBoxVisibility}"
Background="{Binding LoopBackground }"
IsLoopItem="{Binding IsLoopItem }"
TextSaved="{Binding IsSaved,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Options}"
AllowBackgroundChange="True"
Text="{Binding Value,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ></controls:ComboTextBlock>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</TabItem>
<TabItem Header="Steps" IsSelected="True" HorizontalAlignment="Left" Width="60" >
<DataGrid
x:Name="dgCustom"
Grid.Row="2"
AlternationCount="1"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
CanUserReorderColumns="False"
CanUserResizeColumns="True"
CanUserResizeRows="False"
CanUserSortColumns="False"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
FrozenColumnCount="2"
GridLinesVisibility="All"
HeadersVisibility="Column"
ItemsSource="{Binding RecipeTable.RecipeData.ViewSteps}"
RowHeight="30"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectedItem="{Binding SelectedStep}"
SelectionMode="Extended"
SelectionUnit="FullRow"
Validation.ErrorTemplate="{x:Null}"
VirtualizingPanel.CacheLengthUnit="Item"
VirtualizingPanel.IsContainerVirtualizable="True"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling">
<DataGrid.Resources>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn
Binding="{Binding StepNo}"
Header="Step"
Width="Auto"
IsReadOnly="True"/>
</DataGrid.Columns>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
</DataGrid>
</TabItem>
</TabControl>
<!--<DataGrid
x:Name="dgCustom"
Grid.Row="2"
AlternationCount="1"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
CanUserReorderColumns="False"
CanUserResizeColumns="True"
CanUserResizeRows="False"
CanUserSortColumns="False"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
FrozenColumnCount="2"
GridLinesVisibility="All"
HeadersVisibility="Column"
ItemsSource="{Binding RecipeTable.RecipeData.ViewSteps}"
RowHeight="30"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectedItem="{Binding SelectedStep}"
SelectionMode="Extended"
SelectionUnit="FullRow"
Validation.ErrorTemplate="{x:Null}"
VirtualizingPanel.CacheLengthUnit="Item"
VirtualizingPanel.IsContainerVirtualizable="True"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling">
<DataGrid.Resources>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn
Binding="{Binding StepNo}"
Header="Step"
IsReadOnly="True"/>
</DataGrid.Columns>
</DataGrid>-->
</Grid>
</UserControl>中的<Border Grid.Column="1"
BorderBrush="Gray"
BorderThickness="0,1,1,1">
<Border.Style>
<Style TargetType="Border">
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValid, Mode=OneWay}" Value="Invalid">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<TextBlock HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding IsValid, Mode=OneWay}"/>
</Border>当有TextSaved变为false时,也会变成红色
最新发布