<CheckBox Grid.Column="7" IsChecked="{Binding FilterRegex}" PropertyChanged="FilterChanged" Margin="4,4,5,4" ToolTip.Tip="Whether to match using RegEx."/>
<ComboBox Grid.Column="1" Items="{Binding OperationTypes}" SelectedIndex="{Binding SelectedOperationType}" ToolTip.Tip="The type of the operation to add."/>
<Button Grid.Column="2" Content=" + " Command="{Binding AddOperation}" ToolTip.Tip="Adds a new operation after the one selected (or at the end)."/>
<Button Grid.Column="3" Content=" - " Command="{Binding RemoveOperation}" ToolTip.Tip="Removes the selected operation (or the first one)."/>
<ButtonSpinner Grid.Column="4" Spin="MoveOperation" ToolTip.Tip="Moves the selected operation (or the first one)."/>
<Button Grid.Column="0" Content="Undo" Command="{Binding Undo}" IsEnabled="{Binding !!UndoCount}" ToolTip.Tip="Undoes the last operation. Works multiple times."/>
<Button Grid.Column="1" Content="Rename All" Command="{Binding Commit}" IsEnabled="{Binding IsCommitButtonEnabled}" ToolTip.Tip="Renames all the files according to the preview. This button is disabled if the preview is invalid."/>
<CheckBox Grid.Column="0" Margin="0,0,8,0" IsChecked="{Binding IsEnabled}" Command="{Binding $parent[6].DataContext.Preview}" ToolTip.Tip="Enable/Disable the operation."/>
<TextBlock Grid.Column="1" Margin="0,0,8,0" Text="{Binding Name}" ToolTip.Tip="Click here to expand, or further to the side to select this operation."/>
<CheckBox Grid.Row="1" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to overwrite the file extension as well."/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts removed.">
<NumericUpDown Grid.Row="3" Value="{Binding FromN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFromNToN}" PropertyChanged="PreviewChanged" ToolTip.Tip="Zero-based start index for the part to remove."/>
<NumericUpDown Grid.Row="4" Value="{Binding ToN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFromNToN}" PropertyChanged="PreviewChanged" ToolTip.Tip="Zero-based end index for the part to remove."/>
<NumericUpDown Grid.Row="5" Value="{Binding FirstN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFirstN}" PropertyChanged="PreviewChanged" ToolTip.Tip="The number of characters to remove at the start of the file name."/>
<NumericUpDown Grid.Row="6" Value="{Binding LastN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsLastN}" PropertyChanged="PreviewChanged" ToolTip.Tip="The number of characters to remove at the end of the file name."/>
<CheckBox Grid.Row="8" IsChecked="{Binding UseRegex}" IsVisible="{Binding #ModeSelector.SelectedItem.IsPattern}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to match using RegEx."/>
<CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="How to select the parts replaced.">
<NumericUpDown Grid.Row="3" Value="{Binding FromN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFromNToN}" PropertyChanged="PreviewChanged" ToolTip.Tip="Zero-based start index for the part to replace."/>
<NumericUpDown Grid.Row="4" Value="{Binding ToN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFromNToN}" PropertyChanged="PreviewChanged" ToolTip.Tip="Zero-based end index for the part to replace."/>
<NumericUpDown Grid.Row="5" Value="{Binding FirstN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsFirstN}" PropertyChanged="PreviewChanged" ToolTip.Tip="The number of characters to replace at the start of the file name."/>
<NumericUpDown Grid.Row="6" Value="{Binding LastN}" IsVisible="{Binding #ModeSelector.SelectedItem.IsLastN}" PropertyChanged="PreviewChanged" ToolTip.Tip="The number of characters to replace at the end of the file name."/>
<TextBox Grid.Row="7" Text="{Binding Replacement}" PropertyChanged="PreviewChanged" ToolTip.Tip="The replacement to insert at the matched position/-s."/>
<CheckBox Grid.Row="8" IsChecked="{Binding UseRegex}" IsVisible="{Binding #ModeSelector.SelectedItem.IsPattern}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to match using RegEx."/>
<CheckBox Grid.Row="10" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
<TextBox Grid.Row="1" Text="{Binding Pattern}" IsVisible="{Binding #ModeSelector.SelectedItem.IsReplace}" PropertyChanged="PreviewChanged" ToolTip.Tip="The pattern to replace with the numbering."/>
<NumericUpDown Grid.Row="2" Value="{Binding InsertPosition}" IsVisible="{Binding #ModeSelector.SelectedItem.IsInsert}" PropertyChanged="PreviewChanged" ToolTip.Tip="The zero-based index where to insert the numbering."/>
<NumericUpDown Grid.Row="4" Value="{Binding Increment}" PropertyChanged="PreviewChanged" ToolTip.Tip="The increment to each successive file name (can be negative)."/>
<NumericUpDown Grid.Row="5" Value="{Binding Padding}" PropertyChanged="PreviewChanged" ToolTip.Tip="The minimum number of digits for each number (pads with 0s)."/>
<CheckBox Grid.Row="6" IsChecked="{Binding AutoPadding}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to automatically apply padding based on the highest number."/>
<CheckBox Grid.Row="7" IsChecked="{Binding UseRegex}" IsVisible="{Binding #ModeSelector.SelectedItem.IsReplace}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to match using RegEx."/>
<TextBlock Grid.Row="8" Text="Full Name:"/>
<CheckBox Grid.Row="8" IsChecked="{Binding FullName}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="Where to add the new text.">
<NumericUpDown Grid.Row="1" Value="{Binding InsertPosition}" IsVisible="{Binding #ModeSelector.SelectedItem.IsInsert}" PropertyChanged="PreviewChanged" ToolTip.Tip="The zero-based index at which to insert the new text."/>
<ComboBox Grid.Row="0" Items="{Binding Modes}" Name="ModeSelector" SelectedIndex="{Binding Mode}" PropertyChanged="PreviewChanged" ToolTip.Tip="The method that is used to compare and sort the file names.">
<CheckBox Grid.Row="2" IsChecked="{Binding FullName}" IsVisible="{Binding !#ModeSelector.SelectedItem.IsReverse}" PropertyChanged="PreviewChanged" ToolTip.Tip="Whether to consider the file extension as well."/>