Added filter options to UI

- Filter options only visible when expanded
- Expander seperate from the filter options grid to keep the directory controls in place
- Added and fixed some styling
This commit is contained in:
adroslice 2019-11-14 17:21:25 +01:00
parent 472650a5e5
commit 90f8f86e81

View File

@ -5,12 +5,28 @@
mc:Ignorable="d" MinWidth="720" MinHeight="480"
x:Class="BFR.MainWindow"
Title="BFR">
<Grid RowDefinitions="auto,auto,*" ColumnDefinitions="*,*,*">
<!-- Directory Selection and TODO:Filter -->
<Grid Grid.ColumnSpan="3" ColumnDefinitions="*,auto">
<TextBox Grid.Column="0" IsEnabled="False" Text="C:/Example.File.png"/>
<Button Grid.Column="1" Content=" ... "/>
<Grid RowDefinitions="auto,auto,*" ColumnDefinitions="*,*,*" Classes="StyleBorders">
<!-- Directory Selection + Filters -->
<Border Grid.Row="0" Grid.ColumnSpan="3">
<Grid RowDefinitions="*,auto" ColumnDefinitions="auto,*,auto">
<Expander Grid.Column="0" Name="FilterExpander" Header="Filter"/>
<TextBox Grid.Column="1" IsEnabled="False" Text="C:/Example.File.png"/>
<Button Grid.Column="2" Content=" ... "/>
<!-- Filters -->
<Grid Grid.Row="1" Grid.ColumnSpan="3" ColumnDefinitions="auto,*,auto,*,auto,auto,auto,auto" IsVisible="{Binding #FilterExpander.IsExpanded}">
<TextBlock Grid.Column="0" Text="Extension:"/>
<TextBox Grid.Column="1"/>
<TextBlock Grid.Column="2" Text="Name:"/>
<TextBox Grid.Column="3"/>
<TextBlock Grid.Column="4" Text="Full Name:"/>
<CheckBox Grid.Column="5"/>
<TextBlock Grid.Column="6" Text="Regex:"/>
<CheckBox Grid.Column="7" Margin="4,4,5,4"/>
</Grid>
</Grid>
</Border>
<!-- ListBox Headers -->
<TextBox Classes="HeaderTextBox" Grid.Row="1" Grid.Column="0" Text="Before"/>
<TextBox Classes="HeaderTextBox" Grid.Row="1" Grid.Column="1" Text="Operations"/>
@ -21,9 +37,9 @@
<ListBox Grid.Row="2" Grid.Column="2"/>
<!-- Middle Section (Operations, Controls) -->
<Grid Grid.Row="2" Grid.Column="1" RowDefinitions="*,auto,auto">
<Grid Grid.Row="2" Grid.Column="1" RowDefinitions="*,auto,auto" Classes="StyleBorders">
<!-- Operations ListBox -->
<ListBox/>
<ListBox Grid.Row="0"/>
<!-- Operations Controls -->
<Border Grid.Row="1" Classes="ConnectUp">
@ -47,6 +63,9 @@
</Grid>
<Window.Styles>
<Style Selector="Grid > Expander">
<Setter Property="Margin" Value="4"/>
</Style>
<Style Selector="Grid > ListBox">
<Setter Property="Margin" Value="4"/>
</Style>
@ -66,6 +85,10 @@
<Setter Property="Margin" Value="4"/>
<Setter Property="Grid.Column" Value="1"/>
</Style>
<Style Selector="Grid > CheckBox">
<Setter Property="Margin" Value="4"/>
<Setter Property="Grid.Column" Value="1"/>
</Style>
<Style Selector="Grid > TextBlock">
<Setter Property="Margin" Value="8"/>
<Setter Property="Grid.Column" Value="0"/>
@ -76,13 +99,13 @@
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
<Style Selector="Grid > Border">
<Style Selector="Grid.StyleBorders > Border">
<Setter Property="Margin" Value="4"/>
<Setter Property="Padding" Value="4"/>
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style Selector="Grid > Border.ConnectUp">
<Style Selector="Border.ConnectUp">
<Setter Property="Margin" Value="4,-5,4,4"/>
</Style>
</Window.Styles>