167 lines
8.1 KiB
XML
167 lines
8.1 KiB
XML
<UserControl
|
|
x:Class="BeWo.View.Search.MultiEmployeeSearch"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converter="clr-namespace:BeWo.Scheduler.Converter"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="300"
|
|
d:DesignWidth="300"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<converter:CheckBoxConverter x:Key="CheckBoxConverter" />
|
|
</UserControl.Resources>
|
|
<Grid Background="Black">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="3"
|
|
VerticalAlignment="Center"
|
|
Content="Suche:"
|
|
Foreground="#FFD2D2D2" />
|
|
<TextBox
|
|
x:Name="SuchTextBox"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="0,3,3,3"
|
|
TextChanged="SuchTextBox_OnPreviewKeyDown" />
|
|
<ListBox
|
|
x:Name="listbox_result"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="2"
|
|
HorizontalContentAlignment="Stretch"
|
|
BorderThickness="0"
|
|
ItemsSource="{Binding Path=AngezeigteMitarbeiter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid>
|
|
<Border
|
|
MinHeight="23"
|
|
Margin="0,1,3,1"
|
|
Background="{StaticResource EmployeeContentBrush}"
|
|
CornerRadius="5" />
|
|
<Border
|
|
x:Name="ItemBorder"
|
|
MinHeight="23"
|
|
Margin="0,1,3,1"
|
|
Background="#FF000000"
|
|
CornerRadius="5">
|
|
<Border.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#19000000" />
|
|
<GradientStop Offset="1" Color="#26000000" />
|
|
</LinearGradientBrush>
|
|
</Border.OpacityMask>
|
|
</Border>
|
|
<Border
|
|
Height="23"
|
|
BorderBrush="{x:Null}"
|
|
CornerRadius="5">
|
|
<CheckBox
|
|
Margin="6,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Checked="EmployeeCheckedEvent"
|
|
Content="{Binding Path=DetailDescription}"
|
|
FontFamily="Microsoft Sans Serif"
|
|
Foreground="#FFD2D2D2"
|
|
PreviewMouseDown="EmployeeLB_OnClick"
|
|
Tag="{Binding}"
|
|
Unchecked="EmployeeCheckedEvent">
|
|
<CheckBox.IsChecked>
|
|
<MultiBinding
|
|
Converter="{StaticResource CheckBoxConverter}"
|
|
ConverterParameter="Mitarbeiter"
|
|
NotifyOnSourceUpdated="True"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding Mode="OneWay" Path="EmployeeOid" />
|
|
<Binding
|
|
Mode="TwoWay"
|
|
Path="AusgewaehlteMitarbeiter"
|
|
RelativeSource="{RelativeSource FindAncestor,
|
|
AncestorType={x:Type UserControl}}"
|
|
UpdateSourceTrigger="PropertyChanged" />
|
|
</MultiBinding>
|
|
</CheckBox.IsChecked>
|
|
</CheckBox>
|
|
</Border>
|
|
</Grid>
|
|
<DataTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#33000000" />
|
|
<GradientStop Offset="1" Color="#66000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#CC000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ListBoxItem.IsSelected" Value="True" />
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#B2000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</MultiTrigger>
|
|
</DataTemplate.Triggers>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<Grid
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox
|
|
Grid.Column="0"
|
|
Margin="12,3,3,3"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Checked="AlleSelektierenCBUnChecked"
|
|
Content="Alle auswählen"
|
|
Foreground="#FFD2D2D2"
|
|
IsThreeState="False"
|
|
Unchecked="AlleSelektierenCBUnChecked" />
|
|
<Button
|
|
Grid.Column="1"
|
|
Width="70"
|
|
Height="25"
|
|
Margin="3"
|
|
HorizontalAlignment="Right"
|
|
Command="ApplicationCommands.Close"
|
|
Content="Schließen" />
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|