<localView:BeWoView x:Class="BeWo.View.Detail.OrganisationView"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:localView="clr-namespace:BeWo.View"
                    xmlns:val="clr-namespace:BeWo.Validation" 
                    xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 
                    xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
                    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" Height="Auto" Width="Auto" 
                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
    <Grid x:Name="gridroot">
      <Grid.Resources>
        <dxg:GridControl VerticalAlignment="Stretch" DataSource="{Binding Path=PersonRelations.VMList}" HorizontalAlignment="Stretch" x:Key="datagrid_PersonRelation">
          <dxg:GridControl.Columns>
            <dxg:GridColumn AllowEditing="False" FieldName="Person.LastName" Header="Nachname" Width="100" ReadOnly="True" />
            <dxg:GridColumn AllowEditing="False" FieldName="Person.FirstName" Header="Vorname" Width="100" ReadOnly="True" />
            <dxg:GridColumn AllowEditing="False" FieldName="Person.Function" Header="Funktion" Width="100" ReadOnly="True" />
            <dxg:GridColumn AllowEditing="False" FieldName="Person.Communication1" Header="Telefon" Width="100" ReadOnly="True" />
            <dxg:GridColumn AllowEditing="False" FieldName="Person.Communication3" Header="E-Mail" Width="100" ReadOnly="True">
                <dxg:GridColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Hyperlink NavigateUri="{Binding Path=RowData.Row.Person.Communication3, RelativeSource={RelativeSource Mode=TemplatedParent}}" RequestNavigate="Hyperlink_OnRequestNavigate" TargetName="_blank">
                                <TextBlock Text="{Binding Path=RowData.Row.Person.Communication3, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                            </Hyperlink>
                        </TextBlock>
                    </DataTemplate>
                </dxg:GridColumn.CellTemplate>
            </dxg:GridColumn>
            <dxg:GridColumn AllowEditing="False" FieldName="Person.Communication2" Header="Fax" Width="100" ReadOnly="True" />
            <dxg:GridColumn AllowEditing="False" FieldName="Notice" Header="Notiz" Width="100" ReadOnly="True" />
          </dxg:GridControl.Columns>
          <dxg:GridControl.View>
            <dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" RowDoubleClick="TableView_OnRowDoubleClick" />
          </dxg:GridControl.View>
        </dxg:GridControl>
      </Grid.Resources>
        <uc:ShadowChrome>
            <GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
                <GroupBox.Header>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
                        <Image Source="..\..\Ressources\Icons\OfficeBulidingBlackDisabled.png"
                                RenderTransformOrigin="0.5,0.5" Stretch="Uniform" Width="32">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1" ScaleY="1" />
                                    <SkewTransform AngleX="0" AngleY="0" />
                                    <RotateTransform Angle="0" />
                                    <TranslateTransform X="0" Y="5" />
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                        <TextBox Text="{Binding Path=Name, Mode=OneWay}" Margin="10,0,0,0" Background="{x:Null}"
                                Foreground="#FFFFFFFF" FontSize="22" BorderBrush="{x:Null}" VerticalAlignment="Bottom"
                                Padding="0,0,0,0" />
                    </StackPanel>
                </GroupBox.Header>
                <Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Rectangle Fill="{DynamicResource OrganisationContentBrush}" Height="6" />
                    <TabControl x:Name="root" Grid.Row="1" Style="{StaticResource ObjectEditTabControl}"
                            BorderThickness="0,0,0,0" Padding="4,4,4,4" Grid.IsSharedSizeScope="True">
                        <TabItem x:Name="tabitem_details" Header="Details" IsSelected="True">
                            <GroupBox Header="Eigenschaften" Style="{StaticResource ObjectEditGroupBox}">
                                <Grid x:Name="grid_details">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" MaxWidth="300" />
                                        <ColumnDefinition Width="*" MaxWidth="300" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid Grid.ColumnSpan="3">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
											<RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Grid.Column="0" Grid.Row="0" Content="Name" />
                                        <TextBox VerticalAlignment="Top" Margin="10,3,3,3" Height="23" Grid.Column="1"
                                                Grid.Row="0"
                                                Text="{val:ValidationBinding Path=Name, UpdateSourceTrigger=PropertyChanged}"
                                                Width="300" HorizontalAlignment="Left" />

                                        <Label x:Name="lblDebitorNumber" Grid.Row="1" Content="Kundennummer" />
                                        <TextBox x:Name="txtDebitorNumber" Grid.Column="1" Grid.Row="1" Margin="10,3,3,3" Height="23" 
                                                 Text="{val:ValidationBinding Path=DebitorNumber, UpdateSourceTrigger=PropertyChanged}" 
                                                 Width="300" HorizontalAlignment="Left" />
										<Label x:Name="lblArchiviert" Grid.Column="0" Grid.Row="2" Content="Archiviert" />
										<CheckBox x:Name="chkArchiviert" Grid.Column="1" Grid.Row="2" Margin="10,6,3,0" Height="23" IsChecked="{Binding Path=IsArchived, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Stretch" />
                                    </Grid>
                                    <GroupBox Grid.Column="0" Grid.Row="1" Header="Adresse"
                                            Style="{StaticResource ObjectEditGroupBox}" Margin="0,8,0,0">
                                        <Grid HorizontalAlignment="Stretch">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" SharedSizeGroup="label" />
                                                <ColumnDefinition Width="*" MaxWidth="200" />
                                            </Grid.ColumnDefinitions>
                                            <Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
                                            <Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
                                            <Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
                                            <Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Postfach</Label>
                                            <TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23"
                                                    Text="{Binding Path=Street, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="1" Margin="3" Height="23"
                                                    Text="{Binding Path=PostalCode, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="2" Margin="3" Height="23"
                                                    Text="{Binding Path=Town, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="3" Margin="3" Height="23"
                                                    Text="{Binding Path=POBox, UpdateSourceTrigger=PropertyChanged}" />
                                        </Grid>
                                    </GroupBox>
                                    <GroupBox Grid.Column="1" Grid.Row="1" Header="Rechnungsadresse"
                                            Style="{StaticResource ObjectEditGroupBox}" Margin="8,8,0,0"
                                            >
                                        <Grid HorizontalAlignment="Stretch">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" SharedSizeGroup="label" />
                                                <ColumnDefinition Width="*" MaxWidth="200" />
                                            </Grid.ColumnDefinitions>
                                            <Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
                                            <Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
                                            <Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
                                            <Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Postfach</Label>
                                            <TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23"
                                                    Text="{Binding Path=InvoiceAddressStreet, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="1" Margin="3" Height="23"
                                                    Text="{Binding Path=InvoiceAddressPostalCode, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="2" Margin="3" Height="23"
                                                    Text="{Binding Path=InvoiceAddressTown, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.Row="3" Margin="3" Height="23"
                                                    Text="{Binding Path=InvoiceAddressPOBox, UpdateSourceTrigger=PropertyChanged}" />
                                        </Grid>
                                    </GroupBox>
                                    <GroupBox Grid.Column="2" Grid.Row="1" Header="Kontakt"
                                            Style="{StaticResource ObjectEditGroupBox}" Margin="8,8,0,0"
                                            HorizontalAlignment="Stretch">
                                        <Grid HorizontalAlignment="Stretch">
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" SharedSizeGroup="label" />
                                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                                <ColumnDefinition Width="*" MaxWidth="200" />
                                            </Grid.ColumnDefinitions>
                                            <Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Telefon</Label>
                                            <Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Fax</Label>
                                            <Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Mail</Label>
                                            <Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Homepage</Label>
                                            <Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Center">Ansprechpartner</Label>
                                            <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Margin="3" Height="23"
                                                    Text="{Binding Path=Phone, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Margin="3" Height="23"
                                                    Text="{Binding Path=Fax, UpdateSourceTrigger=PropertyChanged}" />
                                            <Button Grid.Column="1" Grid.Row="2" Content="*" FontFamily="Wingdings" Margin="3" Height="21" Click="EMailButton_OnClick" IsEnabled="{Binding Path=EMail, Converter={StaticResource ObjectBoolConverter}}"/>
                                            <TextBox Grid.Column="2" Grid.Row="2" Margin="3" Height="23"
                                                    Text="{Binding Path=EMail, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" Margin="3" Height="23"
                                                    Text="{Binding Path=Website, UpdateSourceTrigger=PropertyChanged}" />
                                            <TextBox Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="4" Margin="3" Height="23"
                                                    Text="{Binding Path=ContactPerson, UpdateSourceTrigger=PropertyChanged}" />
                                        </Grid>
                                    </GroupBox>
                                    <Grid Grid.ColumnSpan="3" Grid.Row="2">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>
                                        <Label Grid.Column="0" Grid.Row="0" Content="Notizen" Grid.ColumnSpan="2" />
                                        <TextBox Margin="3" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" MaxLength="1000"
                                                VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
                                                Text="{Binding Path=Notice, UpdateSourceTrigger=PropertyChanged}"
                                                Height="Auto" TextWrapping="Wrap" />
                                    </Grid>
                                </Grid>
                            </GroupBox>
                        </TabItem>
						
						<TabItem Header="Weitere Eigenschaften" Name="tabitem_varFields">
							<ScrollViewer VerticalScrollBarVisibility="Auto">
								<localView:VarFieldView VarFieldList="{Binding VarFields}" />
							</ScrollViewer>
						</TabItem>
						
                        <TabItem Header="Kostenträgerdetails" Name="tabitem_costbearer">
                            <ScrollViewer>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <GroupBox Header="Kostenträgerdetails" Style="{StaticResource ObjectEditGroupBox}"
                                            Margin="0,10,0,0">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <CheckBox Margin="3" Height="23"
                                                    IsChecked="{Binding Path=IsCalculatingWithFactor, UpdateSourceTrigger=PropertyChanged}"
                                                    Content="Bewilligungen sind inkl. pauschalem Faktor" />
                                            <WrapPanel Grid.Row="1">
                                                <localView:CostRatePeriodControl CostRateType="{x:Static shared:CostRatePeriodType.MinutesIntervall}"
                                                        VM="{Binding CostRatePeriods}" Foreground="#FF000000"
                                                        Margin="5,5,5,0" ValueLabelText="Rundungsintervall (min)"
                                                        ButtonTooltipText="Neues Rundungsintervall hinzufügen" />
                                                <localView:CostRatePeriodControl CostRateType="{x:Static shared:CostRatePeriodType.RateFactor}"
                                                        VM="{Binding CostRatePeriods}" Foreground="#FF000000"
                                                        Margin="5,5,5,0" ValueLabelText="Pauschaler Faktor (%)"
                                                        ButtonTooltipText="Neuen pauschalen Faktor hinzufügen" />
                                                <localView:CostRatePeriodControl CostRateType="{x:Static shared:CostRatePeriodType.ServiceTolerance}"
                                                        VM="{Binding CostRatePeriods}" Foreground="#FF000000"
                                                        Margin="5,5,5,0" ValueLabelText="Übererbringung Toleranz (%)"
                                                        ButtonTooltipText="Neuen Wert hinzufügen" />
                                                <localView:CostRatePeriodControl CostRateType="{x:Static shared:CostRatePeriodType.MinutesPerServiceUnit}"
                                                        VM="{Binding CostRatePeriods}" Foreground="#FF000000"
                                                        Margin="5,5,5,0" ValueLabelText="Minuten/Betreuungseinheit"
                                                        ButtonTooltipText="Neue Betreuungseinheit hinzufügen"
                                                        IsUnitNameEditingEnabled="True" UnitNameLabelText="Bezeichnung" />
                                            </WrapPanel>
                                        </Grid>
                                    </GroupBox>
                                    <GroupBox Grid.Row="1" Header="Stundensatz"
                                            Style="{StaticResource ObjectEditGroupBox}"
                                            Margin="0,20,0,0">
                                        <WrapPanel>
                                            <localView:CostRatePeriodControl CostRateType="{x:Static shared:CostRatePeriodType.HourlyRate}"
                                                    VM="{Binding CostRatePeriods}" Foreground="#FF000000" Margin="5,5,5,0"
                                                    ValueLabelText="Stundensatz (€)"
                                                    ButtonTooltipText="Neuen Stundensatz hinzufügen" />
                                        </WrapPanel>
                                    </GroupBox>
                                    <GroupBox Grid.Row="2" Header="Qualifikationsabhängige Stundensätze"
                                            Style="{StaticResource ObjectEditGroupBox}"
                                            Margin="0,20,0,0">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                    <ColumnDefinition Width="Auto" />
                                                </Grid.ColumnDefinitions>
                                                <Label Content="Qualifikationsabhängigen Stundensatz hinzufügen" Margin="3" />
                                                <ComboBox Grid.Column="1" Width="200" Name="cb_qualifications" Margin="3"
                                                        ItemsSource="{Binding PossibleQualifications}" />
                                                <Button Name="bt_addQualificationRate" Height="23" Margin="3" Grid.Column="2"
                                                        Content="hinzufügen" Click="bt_addQualificationRate_Click" />
                                            </Grid>
                                            <ListView Margin="3 5 3 0" Grid.Row="1" VerticalAlignment="Stretch"
                                                    ItemsSource="{Binding CostRatePeriods.GroupedByValueListEntry}"
                                                    Background="{x:Null}" BorderBrush="{x:Null}"
                                                    VerticalContentAlignment="Top" Focusable="False"
                                                    ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                                    ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                                                <ListView.ItemContainerStyle>
                                                    <Style TargetType="{x:Type ListBoxItem}">
                                                        <Setter Property="Focusable" Value="false" />
                                                    </Style>
                                                </ListView.ItemContainerStyle>
                                                <ListView.Resources>
                                                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
                                                            Color="Transparent" />
                                                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
                                                            Color="Transparent" />
                                                </ListView.Resources>
                                                <ListView.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <WrapPanel />
                                                    </ItemsPanelTemplate>
                                                </ListView.ItemsPanel>
                                                <ListView.ItemTemplate>
                                                    <DataTemplate>
                                                        <Grid Margin="0 5 5 0">
                                                            <Grid.RowDefinitions>
                                                                <RowDefinition Height="Auto" />
                                                                <RowDefinition Height="Auto" />
                                                            </Grid.RowDefinitions>
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="*" />
                                                                <ColumnDefinition Width="Auto" />
                                                            </Grid.ColumnDefinitions>
                                                            <Label Content="{Binding Key}" VerticalAlignment="Center"
                                                                    FontWeight="Bold" />
                                                            <Button x:Name="button_deleteCostRatePeriodGroup" Width="20"
                                                                    Margin="0 3" VerticalAlignment="Center" Height="20"
                                                                    HorizontalAlignment="Right" Grid.Column="1"
                                                                    Style="{DynamicResource CloseButtonStyle}"
                                                                    Tag="{Binding Key}"
                                                                    ToolTip="Alle Stundensätze zu dieser Qualifikation entfernen"
                                                                    Click="button_deleteCostRatePeriodGroup_Click" />
                                                            <Border Grid.ColumnSpan="2" BorderBrush="#FF86878F"
                                                                    BorderThickness="0,0,0,1" />
                                                            <localView:CostRatePeriodControl Grid.Row="1" Grid.ColumnSpan="2"
                                                                    CostRateType="{x:Static shared:CostRatePeriodType.HourlyRate}"
                                                                    ValueListEntry="{Binding Key}" VM="{Binding Value}"
                                                                    Foreground="#FF000000" ValueLabelText="Stundensatz (€)"
                                                                    ButtonTooltipText="Neuen Stundensatz hinzufügen"
                                                                    Margin="5" />
                                                        </Grid>
                                                    </DataTemplate>
                                                </ListView.ItemTemplate>
                                            </ListView>
                                        </Grid>
                                    </GroupBox>
                                    <GroupBox Grid.Row="3" Header="Rechnungsstellung"
                                            Style="{StaticResource ObjectEditGroupBox}"
                                            Margin="0,20,0,0">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>
                                            <Label Margin="3" VerticalAlignment="Center"
                                                    Content="Sammelrechnung für alle Klienten erstellen" />
                                            <dxe:CheckEdit Grid.Column="1" IsChecked="{Binding IsSingleInvoicePerCustomer}" />
                                        </Grid>
                                    </GroupBox>
                                </Grid>
                            </ScrollViewer>
                        </TabItem>
                        <TabItem Header="Ansprechpartner" Selector.Selected="TabItemsPersons_Selected">
                            <GroupBox x:Name="GroupBoxPersonGrid" Header="Dieser Organisation zugeordnete Ansprechpartner" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0 20 0 0" MinHeight="120">
                            </GroupBox>
                        </TabItem>
                        <TabItem Header="Finanzen" Name="tabitem_finance">
                            <GroupBox Grid.Column="0" Grid.Row="3" Header="Finanzen" Grid.ColumnSpan="2"
                                    Style="{StaticResource ObjectEditGroupBox}" Margin="0,0,0,0">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" SharedSizeGroup="label" />
                                        <ColumnDefinition Width="200" />
                                    </Grid.ColumnDefinitions>
                                    <Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Konto</Label>
                                    <Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">BLZ</Label>
                                    <Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Bankname</Label>
                                    <Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">BIC</Label>
                                    <Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Center">IBAN</Label>
                                    <TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23"
                                            Text="{Binding Path=AccountNumber, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="1" Grid.Row="1" Margin="3" Height="23"
                                            Text="{Binding Path=BankCode, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="1" Grid.Row="2" Margin="3" Height="23"
                                            Text="{Binding Path=BankName, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="1" Grid.Row="3" Margin="3" Height="23"
                                            Text="{Binding Path=Bic, UpdateSourceTrigger=PropertyChanged}" />
                                    <TextBox Grid.Column="1" Grid.Row="4" Margin="3" Height="23"
                                            Text="{Binding Path=IBAN, UpdateSourceTrigger=PropertyChanged}" />
                                </Grid>
                            </GroupBox>
                        </TabItem>
                        <TabItem Header="Dokumente" Name="tabitem_documents" Selector.Selected="tabitem_documents_Selected" />
                        
                      
                    </TabControl>
                    <Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,10,0,0" VerticalAlignment="Stretch"
                            Background="#FF000000">
                        <Border.OpacityMask>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#19000000" Offset="0" />
                                <GradientStop Color="#33FFFFFF" Offset="1" />
                            </LinearGradientBrush>
                        </Border.OpacityMask>
                    </Border>
                    <StackPanel Grid.ColumnSpan="3" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center"
                            Height="Auto" Margin="5,10,0,0" HorizontalAlignment="Right">
                        <Button x:Name="btnSave" Content="Speichern" Margin="0,0,2,0" Command="ApplicationCommands.Save" Height="25" />
                        <Button x:Name="btnClose" Content="Schließen" Margin="0,0,3,0" Command="ApplicationCommands.Close" Height="25" />
                    </StackPanel>
                </Grid>
            </GroupBox>
        </uc:ShadowChrome>
    </Grid>
</localView:BeWoView>