48 lines
2.8 KiB
XML
48 lines
2.8 KiB
XML
<UserControl x:Class="BeWo.View.Search.ResourcesTreeSearchView"
|
|
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:converter="clr-namespace:BeWo.Scheduler.Converter"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="300">
|
|
<UserControl.Resources>
|
|
<converter:CheckBoxConverter x:Key="CheckBoxConverter" />
|
|
</UserControl.Resources>
|
|
<Grid Background="Black">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TreeView Margin="5" ItemsSource="{Binding Path=Category2ResourcesDictionary, UpdateSourceTrigger=PropertyChanged}" Grid.ColumnSpan="2" x:Name="listbox_result"
|
|
HorizontalContentAlignment="Stretch" BorderThickness="0" ItemContainerStyle="{StaticResource SupportConceptTreeViewStyle}">
|
|
<TreeView.ItemTemplate>
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Path=Value}">
|
|
<Border BorderBrush="{x:Null}" Height="23">
|
|
<TextBlock FontWeight="Bold" Text="{Binding Path=Key}" VerticalAlignment="Center" />
|
|
</Border>
|
|
<HierarchicalDataTemplate.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="{x:Null}" Height="23">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<CheckBox VerticalAlignment="Center" Tag="{Binding}" Checked="ResourceCheckedEvent" Unchecked="ResourceCheckedEvent" PreviewMouseDown="RessourcenTV_OnClick">
|
|
<CheckBox.IsChecked>
|
|
<MultiBinding Converter="{StaticResource CheckBoxConverter}" ConverterParameter="Ressourcen" UpdateSourceTrigger="PropertyChanged" NotifyOnSourceUpdated="True">
|
|
<Binding Path="ResourceOid" Mode="OneWay" />
|
|
<Binding Path="AusgewaehlteRessourcen" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
|
|
</MultiBinding>
|
|
</CheckBox.IsChecked>
|
|
</CheckBox>
|
|
<Rectangle VerticalAlignment="Center" Stroke="Black" StrokeThickness="1" Margin="1,0,1,0" Height="10" Width="10" Fill="{Binding Color, Converter={StaticResource StringBrushConverter}}" />
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding Path=Name}" />
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</HierarchicalDataTemplate.ItemTemplate>
|
|
</HierarchicalDataTemplate>
|
|
</TreeView.ItemTemplate>
|
|
</TreeView>
|
|
<Button HorizontalAlignment="Right" Grid.Row="1" Margin="3,0,3,3" Content="Schließen" Width="70" Height="25" Command="ApplicationCommands.Close" />
|
|
</Grid>
|
|
</UserControl>
|