This commit is contained in:
Husky
2020-07-15 17:18:52 +02:00
parent 3e9a353fc0
commit 7911a44f2f
23 changed files with 290 additions and 127 deletions

View File

@@ -19,14 +19,8 @@
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<TreeView Name="trvItems" ItemsSource="{Binding KanalObjekte}" >
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="local:MouseLeftButtonUp.Command" Value="{Binding DataContext.ObjektSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TreeView}}}" />
<Setter Property="local:MouseLeftButtonUp.CommandParamter"
Value="{Binding ElementName=trvItems, Path=SelectedItem}"/>
</Style>
</TreeView.ItemContainerStyle>
<TreeView Name="trvItems" ItemsSource="{Binding KanalObjekte}" MouseDoubleClick="trvItems_MouseDoubleClick" >
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type self:ObjekteTransfer}" ItemsSource="{Binding Objekte}">
<StackPanel Orientation="Horizontal">
@@ -51,7 +45,7 @@
</DataTemplate>
</TreeView.Resources>
</TreeView>
<Button Grid.Row="1" x:Name="ProjektSelect" Content="Objekt Auswählen" />
<Button Grid.Row="1" x:Name="ProjektSelect" Content="Objekt Auswählen" Command="{Binding ObjektSelected}" />
<Button Grid.Row="2" Name="ProjektEdit" Content="Objekt Editieren" />
<Button Grid.Row="3" Name="ObjektNew" Content="Neue Objekt Hinzufügen" Click="ObjektNew_Click" />