42 lines
2.2 KiB
XML
42 lines
2.2 KiB
XML
<UserControl x:Class="DaSaSo.Wpf.View.SewerObjecte.SewerObjecteListView"
|
|
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:model="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
|
xmlns:dsmodel="clr-namespace:DaSaSo.Domain.DesignModel;assembly=DaSaSo.Domain"
|
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObjecte"
|
|
xmlns:ds="clr-namespace:DaSaSo.Wpf.Sampledata"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<d:UserControl.DataContext>
|
|
<ds:SewerObjectListSampleData />
|
|
</d:UserControl.DataContext>
|
|
<Grid>
|
|
<StackPanel>
|
|
<TreeView ItemsSource="{Binding SewerObjects}" SelectedValuePath="{Binding Testme}">
|
|
<TreeView.Resources>
|
|
<HierarchicalDataTemplate DataType="{x:Type dsmodel:SewerObjectsToStreet}" ItemsSource="{Binding SewerObjects}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Streetname}" />
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
|
|
|
|
<DataTemplate DataType="{x:Type model:SewerObject}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding ObjektName}" />
|
|
<TextBlock Text="{Binding Material}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected}"/>
|
|
</Style>
|
|
</TreeView.Resources>
|
|
</TreeView>
|
|
<Button Content="Bearbeiten" Name="bearbeiten" Command="{Binding EditCommand}" />
|
|
<Button Content="Hinzufügen" Command="{Binding AddCommand}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|