|
@@ -7,10 +7,10 @@
|
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
|
xmlns:cal="http://www.caliburn.org"
|
|
|
mc:Ignorable="d"
|
|
|
- Title="RecipeStepDeleteDialogView" Height="450" Width="210">
|
|
|
+ Title="RecipeStepDeleteDialogView" Height="450" Width="310">
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="80"/>
|
|
|
+ <ColumnDefinition Width="180"/>
|
|
|
<ColumnDefinition Width="120"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Grid.RowDefinitions>
|
|
@@ -31,18 +31,156 @@
|
|
|
<DataGrid Grid.ColumnSpan="2" AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" CanUserSortColumns="False" ItemsSource="{Binding NewSteps,Mode=OneTime}">
|
|
|
<DataGrid.Columns>
|
|
|
|
|
|
- <DataGridTemplateColumn Header="StepNo" IsReadOnly="True" Width="65" >
|
|
|
+ <DataGridTemplateColumn Header="StepNo" IsReadOnly="True" Width="100" >
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
<DataTemplate>
|
|
|
- <StackPanel Orientation="Horizontal">
|
|
|
- <CheckBox IsChecked="{Binding IsChecked,UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
- <TextBlock FontSize="14" Text="{Binding StepNo, UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
- </StackPanel>
|
|
|
+ <CheckBox IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}" MinWidth="100">
|
|
|
+ <TextBlock FontSize="17" Text="{Binding StepNo, UpdateSourceTrigger=PropertyChanged}" Margin="5,10,0,5" MinWidth="200"/>
|
|
|
+ <CheckBox.Resources>
|
|
|
+ <Style x:Key="FocusVisual">
|
|
|
+ <Setter Property="Control.Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Rectangle
|
|
|
+ Margin="2"
|
|
|
+ SnapsToDevicePixels="true"
|
|
|
+ Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
|
|
+ StrokeDashArray="1 2"
|
|
|
+ StrokeThickness="1" />
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Static.Background" Color="#FFFFFFFF" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Static.Border" Color="#FF707070" />
|
|
|
+ <Style x:Key="OptionMarkFocusVisual">
|
|
|
+ <Setter Property="Control.Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Rectangle
|
|
|
+ Margin="14,0,0,0"
|
|
|
+ SnapsToDevicePixels="true"
|
|
|
+ Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
|
|
+ StrokeDashArray="1 2"
|
|
|
+ StrokeThickness="1" />
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <SolidColorBrush x:Key="OptionMark.MouseOver.Background" Color="#FFF3F9FF" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.MouseOver.Border" Color="#FF5593FF" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.MouseOver.Glyph" Color="#FF212121" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Disabled.Background" Color="#FFE6E6E6" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Disabled.Border" Color="#FFBCBCBC" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Disabled.Glyph" Color="#FF707070" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Pressed.Background" Color="#FFD9ECFF" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Pressed.Border" Color="#FF3C77DD" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Pressed.Glyph" Color="#FF212121" />
|
|
|
+ <SolidColorBrush x:Key="OptionMark.Static.Glyph" Color="#FF212121" />
|
|
|
+ <Style TargetType="{x:Type CheckBox}">
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
|
|
|
+ <Setter Property="Background" Value="{StaticResource OptionMark.Static.Background}" />
|
|
|
+ <Setter Property="BorderBrush" Value="{StaticResource OptionMark.Static.Border}" />
|
|
|
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
|
|
|
+ <Setter Property="BorderThickness" Value="1" />
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type CheckBox}">
|
|
|
+ <Grid
|
|
|
+ x:Name="templateRoot"
|
|
|
+ Background="Transparent"
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Border
|
|
|
+ x:Name="checkBoxBorder"
|
|
|
+ Margin="1"
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
+ <Grid
|
|
|
+ x:Name="markGrid"
|
|
|
+ Width="33"
|
|
|
+ Height="33">
|
|
|
+ <Path
|
|
|
+ x:Name="optionMark"
|
|
|
+ Margin="1"
|
|
|
+ Data="F1 M 9.97498,1.22334L 4.6983,9.09834L 4.52164,9.09834L 0,5.19331L 1.27664,3.52165L 4.255,6.08833L 8.33331,1.52588e-005L 9.97498,1.22334 Z "
|
|
|
+ Fill="{StaticResource OptionMark.Static.Glyph}"
|
|
|
+ Opacity="0"
|
|
|
+ Stretch="Uniform" />
|
|
|
+ <Rectangle
|
|
|
+ x:Name="indeterminateMark"
|
|
|
+ Margin="2"
|
|
|
+ Fill="{StaticResource OptionMark.Static.Glyph}"
|
|
|
+ Opacity="0" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <ContentPresenter
|
|
|
+ x:Name="contentPresenter"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="{TemplateBinding Padding}"
|
|
|
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
+ Focusable="False"
|
|
|
+ RecognizesAccessKey="True"
|
|
|
+ SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="HasContent" Value="true">
|
|
|
+ <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}" />
|
|
|
+ <Setter Property="Padding" Value="4,-1,0,0" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.MouseOver.Background}" />
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.MouseOver.Border}" />
|
|
|
+ <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
|
|
|
+ <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.MouseOver.Glyph}" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Disabled.Background}" />
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Disabled.Border}" />
|
|
|
+ <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
|
|
|
+ <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Disabled.Glyph}" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsPressed" Value="true">
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="Background" Value="{StaticResource OptionMark.Pressed.Background}" />
|
|
|
+ <Setter TargetName="checkBoxBorder" Property="BorderBrush" Value="{StaticResource OptionMark.Pressed.Border}" />
|
|
|
+ <Setter TargetName="optionMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
|
|
|
+ <Setter TargetName="indeterminateMark" Property="Fill" Value="{StaticResource OptionMark.Pressed.Glyph}" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="true">
|
|
|
+ <Setter TargetName="optionMark" Property="Opacity" Value="1" />
|
|
|
+ <Setter TargetName="indeterminateMark" Property="Opacity" Value="0" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsChecked" Value="{x:Null}">
|
|
|
+ <Setter TargetName="optionMark" Property="Opacity" Value="0" />
|
|
|
+ <Setter TargetName="indeterminateMark" Property="Opacity" Value="1" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </CheckBox.Resources>
|
|
|
+ <!--<i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="Click">
|
|
|
+ <micro:ActionMessage MethodName="ParameterCheck">
|
|
|
+ <micro:Parameter Value="{Binding }"/>
|
|
|
+ </micro:ActionMessage>
|
|
|
+ </i:EventTrigger>
|
|
|
+ </i:Interaction.Triggers>-->
|
|
|
+ </CheckBox>
|
|
|
</DataTemplate>
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
- <DataGridTemplateColumn Header="StepName" Width="110" IsReadOnly="True" >
|
|
|
+ <DataGridTemplateColumn Header="StepName" Width="*" IsReadOnly="True" >
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
<DataTemplate>
|
|
|
|