54 lines
2.9 KiB
XML
54 lines
2.9 KiB
XML
<UserControl x:Class="KanSan.UI.UCObjekteList"
|
|
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:self="clr-namespace:KanSan.ViewModel;assembly=KanSan.ViewModel"
|
|
xmlns:model="clr-namespace:KanSan.Base.Models;assembly=KanSan.Base"
|
|
xmlns:local="clr-namespace:KanSan.UI"
|
|
xmlns:sd ="clr-namespace:KanSan.SampleData"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="1024" d:DesignWidth="5000">
|
|
<d:UserControl.DataContext>
|
|
<sd:ObjekteListViewModelSampleData />
|
|
</d:UserControl.DataContext>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition Height="50" />
|
|
</Grid.RowDefinitions>
|
|
<TreeView Name="trvItems" ItemsSource="{Binding KanalObjekte}" MouseDoubleClick="trvItems_MouseDoubleClick" >
|
|
|
|
<TreeView.Resources>
|
|
<HierarchicalDataTemplate DataType="{x:Type self:ObjekteTransfer}" ItemsSource="{Binding Objekte}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Strassename}"/>
|
|
<TextBlock Text=" [" Foreground="Blue" />
|
|
<TextBlock Text="{Binding Objekte.Count}" Foreground="Blue" />
|
|
<TextBlock Text="]" Foreground="Blue" />
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<DataTemplate DataType="{x:Type model:Sewer}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="[" />
|
|
<TextBlock Text="{Binding PunktOben.Objektnummer}" Foreground="Blue"/>
|
|
<TextBlock Text="] Nach [" />
|
|
<TextBlock Text="{Binding PunktUnten.Objektnummer}" Foreground="Blue" />
|
|
<TextBlock Text="] DN [" />
|
|
<TextBlock Text="{Binding DN}" Foreground="Blue"/>
|
|
<TextBlock Text="] Material ["/>
|
|
<TextBlock Text="{Binding Material}" Foreground="Blue" />
|
|
<TextBlock Text="]" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</TreeView.Resources>
|
|
</TreeView>
|
|
<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" />
|
|
|
|
</Grid>
|
|
</UserControl>
|