Files
GotecHaftmittel/.svn/pristine/e8/e8f7107d7a2b12af0e2eea6bae6c4c51927ff528.svn-base
2025-10-31 12:50:24 +01:00

607 lines
42 KiB
Plaintext

<Window x:Class="Haftmittel.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:hft="clr-namespace:Haftmittel"
Title="Haftmittel" Height="850" Width="550" Closing="Window_Closing" UseLayoutRounding="True">
<Window.Resources>
<ResourceDictionary>
<hft:ClassProcentyValidationRule x:Key="ProcentyValidationRules"/>
<LinearGradientBrush x:Key="tlo">
<GradientStop Color="#FFD9EDFF" Offset="0"/>
<GradientStop Color="#FFC0DEFF" Offset="0.445"/>
<GradientStop Color="#FFAFD1F8" Offset="0.53"/>
</LinearGradientBrush>
<BitmapImage x:Key="o_1" UriSource="Resources/o1.png"/>
<BitmapImage x:Key="o_2" UriSource="Resources/o2.png"/>
<BitmapImage x:Key="o_3" UriSource="Resources/o3.png"/>
<BitmapImage x:Key="o_4" UriSource="Resources/o4.png"/>
<BitmapImage x:Key="o_5" UriSource="Resources/o5.png"/>
<BitmapImage x:Key="o_6" UriSource="Resources/o6.png"/>
<BitmapImage x:Key="o7" UriSource="Resources/o7.png"/>
<BitmapImage x:Key="o_8" UriSource="Resources/o8.png"/>
<BitmapImage x:Key="o_9" UriSource="Resources/o9.png"/>
<BitmapImage x:Key="o_10" UriSource="Resources/o10.png" />
<BitmapImage x:Key="CloseButton" UriSource="Resources/Close.png"/>
<BitmapImage x:Key="SaveButton" UriSource="Resources/Save.png" />
<BitmapImage x:Key="PrintButton" UriSource="Resources/Print.png" />
<BitmapImage x:Key="o1" UriSource="Resources/gsh06.png"/>
<BitmapImage x:Key="o2" UriSource="Resources/gsh07.png"/>
<BitmapImage x:Key="o3" UriSource="Resources/gsh01.png"/>
<BitmapImage x:Key="o4" UriSource="Resources/gsh02.png"/>
<BitmapImage x:Key="o5" UriSource="Resources/gsh04.png"/>
<BitmapImage x:Key="o6" UriSource="Resources/gsh08.png"/>
<BitmapImage x:Key="o_7" UriSource="Resources/gsh01.png"/>
<BitmapImage x:Key="o8" UriSource="Resources/gsh03.png"/>
<BitmapImage x:Key="o9" UriSource="Resources/gsh05.png"/>
<BitmapImage x:Key="o10" UriSource="Resources/gsh09.png"/>
<hft:ClassKonwerterNaProcenty x:Key="BoolToProcent"/>
<hft:ClassKonwerterNaKolory x:Key="BoolToColorError"/>
<Style x:Key="labelStyle" TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="26" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="FontWeight" Value="Bold"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="labelErrDescStyle" TargetType="Label" >
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="26" />
<Setter Property="Foreground" Value="Red"/>
<Setter Property="Width" Value="Auto" />
<Setter Property="Margin" Value="169,0,10,0"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
<Style x:Key="labelErrDescInhaltstoffeStyle" BasedOn="{StaticResource labelErrDescStyle}" TargetType="Label" >
<Setter Property="Margin" Value="20,0,10,0"/>
</Style>
<Style x:Key="textBoxStyle" TargetType="TextBox" >
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="MinHeight" Value="23"/>
<Setter Property="Height" Value="Auto" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Margin" Value="10,3,10,0"/>
<Setter Property="AcceptsReturn" Value="True"/>
<Setter Property="ToolTipService.ShowDuration" Value="20000"/>
</Style>
<Style x:Key="textBoxLiczbaStyle" TargetType="TextBox" >
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Height" Value="23" />
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
<Setter Property="Width" Value="50" />
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="imageObrazek" TargetType="Image">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Height" Value="50"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Width" Value="50"/>
<Setter Property="RenderOptions.BitmapScalingMode" Value="Fant"/>
</Style>
<Style x:Key="comboSkladnikStyle" TargetType="ComboBox">
<Setter Property="Margin" Value="10,0,10,0"/>
<Setter Property="ItemsSource" Value="{Binding Path=Tag.Skladniki, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="{Binding Kod}"
FontWeight="Bold"/>
<TextBlock Grid.Row="1"
Text="{Binding Nazwa}"
FontWeight="Light"/>
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="SelectedValuePath" Value="Id"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="Width" Value="200"/>
<Setter Property="ToolTip" Value="{Binding Path=SelectedItem.Nazwa, RelativeSource={RelativeSource Self}}"/>
</Style>
<Style x:Key="buttonStyle" TargetType="Button">
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="Margin" Value="10,3,10,3"/>
<Setter Property="Width" Value="Auto"/>
</Style>
<Style x:Key="dataGridHistoriaStyle" TargetType="DataGrid">
<Setter Property="RowHeight" Value="{x:Static sys:Double.NaN}"/>
<Setter Property="RowHeaderWidth" Value="0"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="ColumnWidth" Value="Auto"/>
</Style>
<Style x:Key="toolTipImageStyle" TargetType="ToolTip">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Background="{DynamicResource tlo}" BorderBrush="Black" BorderThickness="1" Padding="2,2,2,2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
HorizontalAlignment="Stretch"
TextAlignment="Center"
DataContext="{TemplateBinding PlacementTarget}"
FontWeight="Bold"
Text="{Binding Tag}"/>
<Image Width="100" Height="100" Grid.Row="1"
DataContext="{TemplateBinding PlacementTarget}"
Source="{Binding Source}"
RenderOptions.BitmapScalingMode="Fant"/>
<DataGrid ItemsSource="{TemplateBinding Content}"
Grid.Row="2"
Style="{DynamicResource dataGridHistoriaStyle}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding data}" Header="Data"/>
<DataGridTextColumn Binding="{Binding opemod}" Header="Operator"/>
<DataGridTextColumn Binding="{Binding wartosc}" Header="Wartość"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="toolTipHistoriaStyle" TargetType="ToolTip">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Background="{DynamicResource tlo}" BorderBrush="Black" BorderThickness="1" Padding="2,2,2,2">
<Grid>
<DataGrid Style="{DynamicResource dataGridHistoriaStyle}" ItemsSource="{TemplateBinding Content}" Grid.Row="1">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding data}" Header="Data" TextBlock.LineHeight="Auto"/>
<DataGridTextColumn Binding="{Binding opemod}" Header="Operator" TextBlock.LineHeight="Auto"/>
<DataGridTextColumn Binding="{Binding wartosc}" Header="Wartość" TextBlock.LineStackingStrategy="MaxHeight" TextBlock.LineHeight="Auto" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="toolTipHistoriaSkladnikaStyle" TargetType="ToolTip">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Background="{DynamicResource tlo}" BorderBrush="Black" BorderThickness="1" Padding="2,2,2,2">
<Grid>
<DataGrid ItemsSource="{TemplateBinding Content}" Grid.Row="1" Style="{DynamicResource dataGridHistoriaStyle}">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding data}" Header="Data" TextBlock.LineHeight="Auto"/>
<DataGridTextColumn Binding="{Binding opemod}" Header="Operator" TextBlock.LineHeight="Auto"/>
<DataGridTextColumn Binding="{Binding wartosc}" Header="Wartość" TextBlock.LineStackingStrategy="MaxHeight" TextBlock.LineHeight="Auto" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SmallButtonStyle" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
<Setter Property="Margin" Value="3"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ControlTemplate.Triggers>
<Trigger Property="Button.IsPressed" Value="True">
<Setter Property="Margin" Value="5,4,1,2"/>
</Trigger>
</ControlTemplate.Triggers>
<StackPanel>
<Image RenderOptions.BitmapScalingMode="Fant" Source="{TemplateBinding Property=Content}">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"/>
</Trigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BigButtonStyle" TargetType="Button" BasedOn="{StaticResource SmallButtonStyle}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="32"/>
<Setter Property="Height" Value="32"/>
<Setter Property="Margin" Value="3,3,3,3"/>
</Style>
<DataTemplate x:Key="InhaltstoffeTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ComboBox Style="{StaticResource comboSkladnikStyle}"
SelectedValue="{Binding Id, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
KeyDown="ComboBox_KeyDown"
Grid.Column="0">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}"
Content="{Binding Historia}"/>
</ToolTipService.ToolTip>
</ComboBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}"
Grid.Column="1"
Text="{Binding Procent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}"
Name="inhT">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}"
Content="{Binding Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}"
Grid.Column="2"
Text="{Binding ProcentDo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}"
Name="inhTDo">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}"
Content="{Binding Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{DynamicResource labelErrDescInhaltstoffeStyle}"
Content="{Binding Path=(Validation.Errors)/ErrorContent, ElementName=inhT}"
Grid.Column="3"/>
</Grid>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid Background="{DynamicResource tlo}" UseLayoutRounding="False">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ScrollViewer Grid.Row="0">
<Grid ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Visible"
Height="Auto"
VerticalAlignment="Top"
UseLayoutRounding="False">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="180"/>
<ColumnDefinition Width="*" MinWidth="319"/>
</Grid.ColumnDefinitions>
<Label Content="Name" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="0" />
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Name}" IsEnabled="False" Grid.Column="1" Grid.Row="0"/>
<Label Content="Lieferant" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="1"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Lieferant}" IsEnabled="False" Grid.Column="1" Grid.Row="1"/>
<Label Content="Herstellort" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="2"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Herstellort, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="2">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Herstellort_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="Artikel" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="3"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Art, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="3"/>
<Label Content="SDS Kenzeichnung" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="4"/>
<!--Obrazki SDS-->
<Grid Grid.Column="1" Grid.Row="4">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Image Style="{DynamicResource imageObrazek}" Margin="10,5,0,0" Grid.Row="0" Tag="Ostra toksyczność" Name="obr1"
Source="{DynamicResource o1}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek1.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek1.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="40,35,0,0" Grid.Row="0" Tag="Ostra toksyczność, działanie uczulające dla skóry i drażniące" Name="obr2"
Source="{DynamicResource o2}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek2.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek2.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="70,5,0,0" Grid.Row="0" Tag="Wybuchowe"
Source="{DynamicResource o3}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek3.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek3.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="100,35,0,0" Grid.Row="0" Tag="Palne"
Source="{DynamicResource o4}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek4.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek4.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="130,5,0,0" Grid.Row="0" Tag="Sprężone gazy"
Source="{DynamicResource o5}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek5.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek5.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="160,35,0,0" Grid.Row="0" Tag="CMR, Uczulające (układ oddechowy) Toksyczność układowa na narządy docelowe (kat 1 i 2)"
Source="{DynamicResource o6}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek6.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek6.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="190,5,0,0" Grid.Row="0" Tag="Utleniające"
Source="{DynamicResource o8}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek8.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek8.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="220,35,0,0" Grid.Row="0" Tag="Żrące"
Source="{DynamicResource o9}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek9.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek9.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<Image Style="{DynamicResource imageObrazek}" Margin="250,5,0,0" Grid.Row="0" Tag="Niebezpieczne dla środowiska"
Source="{DynamicResource o10}" MouseDown="Image_MouseDown_1"
Opacity="{Binding SDS_Obrazek10.Widoczny, Converter={StaticResource BoolToProcent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipImageStyle}" Content="{Binding SDS_Obrazek10.HistoriaObrazka}"/>
</ToolTipService.ToolTip>
</Image>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Row="1" IsEnabled="False"
Text="{Binding SDS_Text_auto, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Row="2"
Text="{Binding SDS_Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding SDS_Text_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
</Grid>
<Label Content="Schichten" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="5"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Schichten, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="5" >
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Schichten_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="Eigenschaft" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="6"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Eigenschaften, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="6">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Eigenschaften_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="Anleitung" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="7"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Anleitung, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="7">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Anleitung_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="FS %" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="8"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding FS_od, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Margin="10,3,260,0" Grid.Column="1" Grid.Row="8" Name="fs_od">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding FS_od_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding FS_do, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Margin="100,3,160,0" Grid.Column="1" Grid.Row="8" Name="fs_do">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding FS_do_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Grid.Column="1" Grid.Row="8">
<Label.Content>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="fs_od" FallbackValue=""/>
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="fs_do" FallbackValue=""/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Label.Content>
</Label>
<Label Content="Dichte" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="9"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Dichte, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}" Margin="10,3,260,0" Grid.Column="1" Grid.Row="9" Name="dichte">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Dichte_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Dichte_do, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}" Margin="100,3,160,0" Grid.Column="1" Grid.Row="9" Name="dichte_do">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Dichte_Historia_do}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Grid.Column="1" Grid.Row="9">
<Label.Content>
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="dichte" FallbackValue=""/>
</Label.Content>
</Label>
<Label Content="Viskosität" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="10"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Viskositat_od, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Margin="10,3,260,0" Grid.Column="1" Grid.Row="10" Name="vis_od">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Viskositat_od_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Viskositat_do, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Margin="100,3,160,0" Grid.Column="1" Grid.Row="10" Name="vis_do">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Viskositat_do_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Grid.Column="1" Grid.Row="10">
<Label.Content>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="vis_od" FallbackValue=""/>
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="vis_do" FallbackValue=""/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Label.Content>
</Label>
<Label Content="Farbe" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="11"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Farbe, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="11" >
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Farbe_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="Verdünnung" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="12"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Verdunnung, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="12" >
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Verdunnung_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Content="Schichtdicke" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="13"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Margin="10,3,260,0" Text="{Binding Schichtdicke_od, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="13" Name="schd_od">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Schichtdicke_od_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Margin="100,3,160,0" Text="{Binding Schichtdicke_do, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="13" Name="schd_do">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Schichtdicke_do_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Grid.Column="1" Grid.Row="13">
<Label.Content>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="schd_od" FallbackValue=""/>
<Binding Path="(Validation.Errors)/ErrorContent" ElementName="schd_do" FallbackValue=""/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Label.Content>
</Label>
<Label Content="Leistung nach Beschichtung" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="14"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Leistung_nach_Beschichtung, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}" Margin="10,3,260,0" Grid.Column="1" Grid.Row="14" Name="leist" >
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Leistung_nach_Beschichtung_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Content="{Binding Path=(Validation.Errors)/ErrorContent, ElementName=leist}" Grid.Column="1" Grid.Row="14"/>
<Label Content="Lagerkapazitat" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="15"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Lagerkapazitat, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}" Margin="10,3,260,0" Grid.Column="1" Grid.Row="15" Name="lager">
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Lagerkapazitat_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<Label Style="{StaticResource labelErrDescStyle}" Content="{Binding Path=(Validation.Errors)/ErrorContent, ElementName=lager}" Grid.Column="1" Grid.Row="15"/>
<Label Content="Verarbeitung" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="16"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Verarbeitung, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="16" >
<ToolTipService.ToolTip>
<ToolTip Style="{DynamicResource toolTipHistoriaStyle}" Content="{Binding Verarbeitung_Historia}"/>
</ToolTipService.ToolTip>
</TextBox>
<!--Składniki-->
<Label Content="Inhaltstoffe" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="17"/>
<Expander Grid.Column="1" Grid.Row="17">
<ItemsControl ItemTemplate="{StaticResource InhaltstoffeTemplate}"
ItemsSource="{Binding Inhaltsstoffe}"
Tag="{Binding .}"/>
</Expander>
<Label Content="Preis" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="18"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Preis, Mode=OneWay}" IsEnabled="False" Margin="10,3,260,0" Grid.Column="1" Grid.Row="18"/>
<Label Content="Einheit preis" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="19"/>
<TextBox Style="{StaticResource textBoxLiczbaStyle}" Text="{Binding Einheit_preis, Mode=OneWay}" IsEnabled="False" Margin="10,3,260,0" Grid.Column="1" Grid.Row="19" Background="{Binding Einheit_preis_error, Converter={StaticResource BoolToColorError}}"/>
<Label Content="Behälter" Style="{StaticResource labelStyle}" Grid.Column="0" Grid.Row="20"/>
<TextBox Style="{StaticResource textBoxStyle}" Text="{Binding Behalter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="20" IsEnabled="False"/>
<Label Content="Text1" Grid.Column="0" Grid.Row="21"/>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Column="1" Grid.Row="21"/>
<Label Content="Text2" Grid.Column="0" Grid.Row="22"/>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Column="1" Grid.Row="22"/>
<Label Content="Text3" Grid.Column="0" Grid.Row="23"/>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Column="1" Grid.Row="23"/>
<Label Content="Text4" Grid.Column="0" Grid.Row="24"/>
<TextBox Style="{StaticResource textBoxStyle}" Grid.Column="1" Grid.Row="24"/>
</Grid>
</ScrollViewer>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Style="{DynamicResource BigButtonStyle}"
Content="{DynamicResource SaveButton}"
Grid.Column="0"
Command="{Binding Zapisz}"/>
<Button Style="{DynamicResource BigButtonStyle}"
Content="{DynamicResource CloseButton}"
Grid.Column="1"
Click="Button_Click"/>
<Button Style="{DynamicResource BigButtonStyle}"
Content="{DynamicResource PrintButton}"
Grid.Column="3"
IsEnabled="False"
/>
</Grid>
<StatusBar HorizontalAlignment="Stretch"
Height="30"
VerticalAlignment="Bottom"
Width="Auto"
Visibility="Collapsed"
Grid.Row="2">
<Label Content="Test"/>
</StatusBar>
</Grid>
</Window>