160 lines
8.6 KiB
XML
160 lines
8.6 KiB
XML
<Window x:Class="dcnsanplanung.wpf.W_ObjektView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:designViewModel="clr-namespace:dcnsanplanung.wpf.DesignViewModel"
|
|
xmlns:local="clr-namespace:dcnsanplanung.wpf"
|
|
mc:Ignorable="d"
|
|
xmlns:views="clr-namespace:dcnsanplanung.wpf.Views"
|
|
Title="W_ObjektView" Height="450" Width="800" d:DataContext="{d:DesignInstance Type=designViewModel:DesignHaltungObjektViewModel, IsDesignTimeCreatable=True}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label Content="Objektbezeichnung" />
|
|
<Label Grid.Column="1" Content="{Binding Objektbezeichnung}" />
|
|
|
|
<Label Grid.Row="1" Content="Schadenklasse" />
|
|
<Label Grid.Row="1" Grid.Column="1" Content="{Binding SK}" />
|
|
|
|
<Label Grid.Row="2" Content="Durchmesser" />
|
|
<Label Grid.Row="2" Grid.Column="1" Content="{Binding DN}" />
|
|
|
|
<Label Grid.Row="3" Content="Material" />
|
|
<Label Grid.Row="3" Grid.Column="1" Content="{Binding Material}" />
|
|
|
|
<Button Grid.Row="4" Content="Speichern" Command="{Binding Speichern}" />
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!--<views:DynamicGridView Grid.Row="1" x:Name="DynamicGridView" DataContext="{Binding Schaeden}"></views:DynamicGridView>-->
|
|
<!--<ListView Grid.Row="1" ItemsSource="{Binding Schaeden}" AlternationCount="2">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListViewItem">
|
|
<Border BorderBrush="WhiteSmoke">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="50" />
|
|
<ColumnDefinition Width="80" />
|
|
<ColumnDefinition Width="10" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="80" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Entfernung}" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Hauptcode}" />
|
|
<TextBlock Grid.Column="2" Text="{Binding Schadensklasse}" />
|
|
|
|
|
|
|
|
<ItemsControl Grid.Column="3" ItemsSource="{Binding Sanierungsvorgaben}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Vorgabe}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" IsItemsHost="True" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
</ItemsControl>
|
|
|
|
<Button Grid.Column="4" Content="Editieren" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
|
<Setter Property="Background" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
|
<Setter Property="Background" Value="LightGray" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="LightBlue" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="DeepSkyBlue" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.Style>
|
|
<Style TargetType="ListView">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListView">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ItemsControl Background="Green" ItemsSource="{Binding Schaeden}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" IsItemsHost="True" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Grid.Row="1">
|
|
<ItemsPresenter />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.Style>
|
|
|
|
</ListView>-->
|
|
<DataGrid Grid.Row="1" ItemsSource="{Binding Schaeden}" AutoGenerateColumns="False">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Entfernung" Binding="{Binding Entfernung}" />
|
|
<DataGridTextColumn Header="Hauptcode" Binding="{Binding Hauptcode}" />
|
|
<DataGridTextColumn Header="Ch1" Binding="{Binding CH1}" />
|
|
<DataGridTextColumn Header="Ch2" Binding="{Binding CH2}" />
|
|
<DataGridTextColumn Header="Q1" Binding="{Binding Q1}" />
|
|
<DataGridTextColumn Header="Q2" Binding="{Binding Q2}" />
|
|
<DataGridTextColumn Header="D" Binding="{Binding KD}" />
|
|
<DataGridTextColumn Header="S" Binding="{Binding KS}" />
|
|
<DataGridTextColumn Header="B" Binding="{Binding KB}" />
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
</Window>
|