92 lines
4.7 KiB
XML
92 lines
4.7 KiB
XML
<localView:BeWoView x:Class="BeWo.View.Detail.MassnahmenTreeViewView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:BeWo.Core"
|
|
xmlns:localView="clr-namespace:BeWo.View"
|
|
xmlns:view="clr-namespace:BeWo.View.Detail"
|
|
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
|
<localView:BeWoView.Resources>
|
|
<ResourceDictionary>
|
|
<view:ValueListEntryTypeToFontWeightConverter x:Key="ValueListEntryTypeToFontWeightConverter" />
|
|
</ResourceDictionary>
|
|
</localView:BeWoView.Resources>
|
|
<GroupBox Name="groupbox_root" Header="Ziele und Maßnahmen" Style="{StaticResource ObjectEditGroupBox}">
|
|
<GroupBox.Resources>
|
|
<ContextMenu x:Key="cmGoals" MenuItem.Click="ContextMenuGoals_Click" Opened="ContextMenuGoals_Opened">
|
|
<MenuItem Header="Neue Maßnahme">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\Ressources\Icons\Add24.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Header="Neues Ziel" >
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\Ressources\Icons\Add24.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Header="Notiz bearbeiten" />
|
|
<MenuItem Header="Umbenennen">
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\Ressources\Icons\Rename24.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<Separator />
|
|
<MenuItem Header="Löschen" >
|
|
<MenuItem.Icon>
|
|
<Image Source="..\..\Ressources\Icons\Delete24.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</GroupBox.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label Grid.Column="0" Content="Beschreibung" />
|
|
<TextBox Grid.Column="1" Margin="0,0,2,0" VerticalContentAlignment="Center" Text="{Binding ViewModel.NewVM.Description, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Button Grid.Column="2" Height="25" Content="Hinzufügen" Margin="0,0,2,0" Click="ZielHinzufuegenButton_Click" />
|
|
</Grid>
|
|
<GroupBox Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}">
|
|
<TreeView x:Name="treeview_individualGoals" Margin="3 3 7 3" Grid.Row="1" Padding="0 5 10 5"
|
|
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
|
|
ItemTemplate="{DynamicResource igoal_treeitemtemplate}" Grid.RowSpan="1" ContextMenu="{StaticResource cmGoals}"
|
|
PreviewMouseDown="GoalTreeViewItem_PreviewMouseRightButtonDown"
|
|
ItemsSource="{Binding IndividualGoalTree, UpdateSourceTrigger=PropertyChanged}" >
|
|
<TreeView.Resources>
|
|
<Style x:Key="igoal_treeitemstyle" TargetType="TreeViewItem">
|
|
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
|
|
</Style>
|
|
<HierarchicalDataTemplate x:Key="igoal_treeitemtemplate" DataType="{x:Type local:SupportConceptGoalTreeItem}" ItemsSource="{Binding Path=Items}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBox Margin="0,0,0,0" Grid.ColumnSpan="2" Cursor="Arrow" Background="Transparent" Height="21" Padding="1,3,1,3" VerticalAlignment="Center"
|
|
LostFocus="TextBox_LostFocus" KeyDown="TextBox_KeyDown" BorderThickness="0"
|
|
IsReadOnly="True" Text="{Binding Path=ItemName, UpdateSourceTrigger=PropertyChanged}"
|
|
FontWeight="{Binding Path=IsGoal, Converter={StaticResource ValueListEntryTypeToFontWeightConverter}}"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Visibility="{Binding Path=IsGoal, Converter={StaticResource BoolVisibilityConverter}}" Foreground="#FF3C3C3C">Notiz:</Label>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" Visibility="{Binding Path=IsGoal, Converter={StaticResource BoolVisibilityConverter}}"
|
|
Text="{Binding Path=Notice, UpdateSourceTrigger=PropertyChanged}" Height="21" VerticalAlignment="Center"
|
|
BorderThickness="0" IsReadOnly="True" LostFocus="TextBox_LostFocus" KeyDown="TextBox_KeyDown" Background="Transparent"/>
|
|
</Grid>
|
|
</HierarchicalDataTemplate>
|
|
</TreeView.Resources>
|
|
</TreeView>
|
|
</GroupBox>
|
|
</Grid>
|
|
</GroupBox>
|
|
</localView:BeWoView>
|