<localView:BeWoView x:Class="BeWo.View.Navigation.MainNavigationView" 
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" 
                    xmlns:local="clr-namespace:BeWo.Core" 
                    xmlns:localView="clr-namespace:BeWo.View" 
                    xmlns:localNavView="clr-namespace:BeWo.View.Navigation" 
                    Focusable="True" Loaded="OnLoaded">
	<localView:BeWoView.CommandBindings>
		<CommandBinding Command="local:BeWoCommands.Excel" Executed="ExcelCommand_Executed" CanExecute="ExcelCommand_CanExecute" />
		<CommandBinding Command="ApplicationCommands.Open" Executed="OpenCommand_Executed" CanExecute="OpenCommand_CanExecute" />
	</localView:BeWoView.CommandBindings>
	<uc:ShadowChrome>
		<GroupBox x:Name="mainGroup" Style="{StaticResource MainContentGroupBoxStyle}" Header="MainGroup">
			<GroupBox x:Name="contentGroup" Style="{StaticResource CustomerNavigationStyle}">
				<GroupBox.Header>
					<StackPanel Orientation="Horizontal">
						<Label Content="Suche" Foreground="#FFFFFFFF" FontSize="14" Margin="0,-5,0,0" />
						<TextBox Height="20" x:Name="textbox_search" MinWidth="90" Margin="3,-5,0,0" Width="300" TabIndex="0" Template="{DynamicResource SearchTextBoxTemplate}" BorderThickness="0,0,0,0" />
                        <Button x:Name="ReloadButton" Click="ReloadButton_OnClick" Margin="5,-3,0,0" ToolTip="Liste aktualisieren" Width="36" Height="24">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Grid>
                                        <Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
                                        <Image x:Name="imgEnabled" Source="..\..\Ressources\Icons\SymbolRefresh32.png" Opacity="0"/>
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="true">
                                            <Setter Property="Opacity" TargetName="imgEnabled" Value="1"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
					</StackPanel>
				</GroupBox.Header>
				<Grid x:Name="mainContentGrid" Margin="0,3,0,0">
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto" />
						<RowDefinition Height="*" />
						<RowDefinition Height="Auto" />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto" />
						<ColumnDefinition Width="*" />
						<ColumnDefinition Width="250" />
					</Grid.ColumnDefinitions>
					<StackPanel Orientation="Vertical" Margin="10,0,0,0">
						<TextBlock x:Name="searchCountLabel" HorizontalAlignment="Left" Text="{Binding Path=Items.Count, Converter={StaticResource StringFormatConverter}, ConverterParameter=Suchergebnisse: \{0\}, ElementName=objectListBox}" FontFamily="Microsoft Sans Serif" FontSize="14" />
						<StackPanel Orientation="Horizontal" x:Name="sortPanel">
							<TextBlock x:Name="sortLabel" HorizontalAlignment="Left" Text="Sortiert nach" FontFamily="Microsoft Sans Serif" FontSize="12" Margin="0,2,0,0" />
							<ComboBox x:Name="sortCombo" HorizontalAlignment="Left" FontFamily="Microsoft Sans Serif" FontSize="12" Margin="10,0,0,0" MinWidth="100" DisplayMemberPath="DisplayName" SelectionChanged="sortCombo_SelectionChanged" Style="{DynamicResource SortComboBox}" />
							<ToggleButton Style="{DynamicResource SortDirectionToggleButtonStyle}" x:Name="sortDirectionToggleButton" Click="sortDirectionToggleButton_Click" />
							<CheckBox FontFamily="Microsoft Sans Serif" FontSize="12" Margin="10,0,0,0" Content=" Archivierte Objekte anzeigen" VerticalAlignment="Center" x:Name="chkShowArchived" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" />
							<CheckBox FontFamily="Microsoft Sans Serif" FontSize="12" Margin="10,0,0,0" Content=" Gelöschte Objekte anzeigen" VerticalAlignment="Center" x:Name="chkShowDeleted" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" />
						</StackPanel>
					</StackPanel>
					<ListBox x:Name="objectListBox" IsSynchronizedWithCurrentItem="True" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" MinWidth="200" MinHeight="200" Margin="10,10,0,20" TabIndex="1" AlternationCount="-1" Style="{StaticResource NavigationListStyle}" Background="{x:Null}" MouseDoubleClick="objectListBox_MouseDoubleClick" SelectionChanged="objectListBox_SelectionChanged">
						<ListBox.ItemsSource>
							<MultiBinding x:Name="ListBoxMultiBinding" Converter="{StaticResource FilterDCConverter}">
								<Binding />
								<Binding ElementName="textbox_search" Path="Text" />
								<Binding ElementName="chkShowArchived" Path="IsChecked" />
								<Binding Path="CustomFilter">
									<Binding.RelativeSource>
										<RelativeSource Mode="FindAncestor" AncestorType="{x:Type localNavView:MainNavigationView}" />
									</Binding.RelativeSource>
								</Binding>
								<Binding ElementName="chkShowDeleted" Path="IsChecked" />
							</MultiBinding>
						</ListBox.ItemsSource>
					</ListBox>
					<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" Margin="20,0,5,0">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
						</Grid.RowDefinitions>
						<StackPanel>
							<TextBlock HorizontalAlignment="Left" Text=" Zuletzt angesehen" FontFamily="Microsoft Sans Serif" FontSize="14" />
							<Path Data="M 0,0 H 250" Stroke="#FFFB6F0E" StrokeThickness="2" Fill="{DynamicResource LightOrangeBrush}" Margin="0,3,0,0" />
							<ListBox x:Name="objectHistoryListBox" IsSynchronizedWithCurrentItem="True" MinWidth="200" Margin="0,5,0,20" TabIndex="1" AlternationCount="-1" Style="{StaticResource NavigationListStyle}" Background="{x:Null}" MouseDoubleClick="objectHistoryListBox_MouseDoubleClick" SelectionChanged="objectListBox_SelectionChanged" />
						</StackPanel>
						<StackPanel x:Name="stackPanle_details" Visibility="Hidden" Grid.Row="1" Margin="0 10 0 0">
							<TextBlock HorizontalAlignment="Left" Text="Details
                                   " FontFamily="Microsoft Sans Serif" FontSize="14" />
							<Path Data="M 0,0 H 250" Stroke="#FFFB6F0E" StrokeThickness="2" Fill="{DynamicResource LightOrangeBrush}" Margin="0,3,0,0" />
							<ContentPresenter x:Name="details_presenter" />
						</StackPanel>
					</Grid>
					<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="Stretch" Height="40" Margin="5,10,0,0">
						<Button x:Name="btnNew" Content="Neu" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="3,0,0,0" Click="btnNew_Click" />
						<Button x:Name="btnCopy" Visibility="Collapsed" Content="Kopieren" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnCopy_Click" />
						<Button x:Name="btnEdit" Content="Öffnen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnEdit_Click" />
						<Button x:Name="btnArchive" Content="Archivieren" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnArchive_Click" />
						<Button x:Name="btnDelete" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnDelete_Click" />
						<TextBlock x:Name="textblock_link" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="16">
							<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="White" RequestNavigate="linkExcelExport_RequestNavigate">Excel Export</Hyperlink>
						</TextBlock>
                        <!--###CB SERIENBRIEF<Button x:Name="MailMergeButton" Content="Serienbrief drucken" Style="{StaticResource NavigationToolbarButtonStyle}" Margin="10,0,0,0" Click="btnMailMerge_Click" />-->
					</StackPanel>
				</Grid>
			</GroupBox>
		</GroupBox>
	</uc:ShadowChrome>
</localView:BeWoView>