While doing so, I have also refactored the shipcall processing logic in the main window. All changes now go through the filter and sorting stage before all controls are removed and only the controls matching to the sorted list are added to the stack panel.
82 lines
5.1 KiB
XML
82 lines
5.1 KiB
XML
<UserControl x:Class="BreCalClient.SearchFilterControl"
|
|
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:p = "clr-namespace:BreCalClient.Resources"
|
|
xmlns:local="clr-namespace:BreCalClient"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="56" d:DesignWidth="800" Loaded="UserControl_Loaded">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60" />
|
|
<ColumnDefinition Width=".1*" />
|
|
<ColumnDefinition Width=".2*" />
|
|
<ColumnDefinition Width=".1*" />
|
|
<ColumnDefinition Width=".2*" />
|
|
<ColumnDefinition Width=".1*" />
|
|
<ColumnDefinition Width=".2*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Logo -->
|
|
<Image Grid.Column="0" Grid.RowSpan="2" x:Name="logoImage" Source="Resources/logo_bremen_calling.png" Stretch="Fill" MouseUp="logoImage_MouseUp" Margin="0"/>
|
|
|
|
<!-- Labels -->
|
|
<Label Grid.Row="0" Grid.Column="1" HorizontalContentAlignment="Right">
|
|
<TextBlock>
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="{}{0} {1}">
|
|
<Binding Source="{x:Static p:Resources.textInterval}" />
|
|
<Binding Source="{x:Static p:Resources.textFrom}" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Label>
|
|
<Label Grid.Row="0" Grid.Column="3" Content="{x:Static p:Resources.textCategories}" HorizontalContentAlignment="Right" />
|
|
<Label Grid.Row="0" Grid.Column="5" HorizontalContentAlignment="Right">
|
|
<TextBlock>
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="{}{0} {1}">
|
|
<Binding Source="{x:Static p:Resources.textShipLength}" />
|
|
<Binding Source="{x:Static p:Resources.textFrom}" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Label>
|
|
<Label Grid.Row="1" Grid.Column="1" Content="{x:Static p:Resources.textSearch}" HorizontalContentAlignment="Right"/>
|
|
<Label Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textBerths}" HorizontalContentAlignment="Right"/>
|
|
<Label Grid.Row="1" Grid.Column="5" Content="{x:Static p:Resources.textAgencies}" HorizontalContentAlignment="Right"/>
|
|
|
|
<!-- Filter input controls -->
|
|
<Grid Grid.Column="2" Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width=".5*" />
|
|
<ColumnDefinition Width="30" />
|
|
<ColumnDefinition Width=".5*" />
|
|
</Grid.ColumnDefinitions>
|
|
<DatePicker x:Name="datePickerETAFrom" Grid.Column="0" Margin="2" SelectedDateChanged="datePickerETAFrom_SelectedDateChanged" SelectedDate="{Binding Path=EtaFrom}"/>
|
|
<Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" />
|
|
<DatePicker x:Name="datePickerETATo" Grid.Column="2" Margin="2" SelectedDateChanged="datePickerETATo_SelectedDateChanged" SelectedDate="{Binding Path=EtaTo}"/>
|
|
</Grid>
|
|
<xctk:CheckComboBox x:Name="comboBoxCategories" Grid.Column="4" Margin="2" ItemSelectionChanged="comboBoxCategories_ItemSelectionChanged" />
|
|
<Grid Grid.Column="6" Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width=".5*" />
|
|
<ColumnDefinition Width="30" />
|
|
<ColumnDefinition Width=".5*" />
|
|
</Grid.ColumnDefinitions>
|
|
<xctk:DoubleUpDown x:Name="upDownShiplengthFrom" Grid.Column="0" Margin="2" Minimum="0" Maximum="1000" ValueChanged="upDownShiplengthFrom_ValueChanged" Value="{Binding Path=ShipLengthFrom}" />
|
|
<Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" />
|
|
<xctk:DoubleUpDown x:Name="upDownShiplengthTo" Grid.Column="2" Margin="2" Minimum="0" Maximum="1000" ValueChanged="upDownShiplengthTo_ValueChanged" Value="{Binding Path=ShipLengthTo}"/>
|
|
</Grid>
|
|
<xctk:WatermarkTextBox x:Name="textBoxSearch" Grid.Column="2" Grid.Row="1" Margin="2" Watermark="{x:Static p:Resources.textEnterKeyword}" PreviewTextInput="textBoxSearch_PreviewTextInput" DataObject.Pasting="textBoxSearch_Pasting" TextChanged="textBoxSearch_TextChanged" />
|
|
<xctk:CheckComboBox x:Name="comboBoxBerths" DisplayMemberPath="Name" Grid.Column="4" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxBerths_ItemSelectionChanged" />
|
|
<xctk:CheckComboBox x:Name="comboBoxAgencies" DisplayMemberPath="Name" Grid.Column="6" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxAgencies_ItemSelectionChanged" />
|
|
</Grid>
|
|
</UserControl>
|