Files
BeWoPlaner/BeWo/View/Navigation/MainNavigationView.xaml
2025-12-18 14:05:12 +01:00

324 lines
17 KiB
XML

<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:local="clr-namespace:BeWo.Core"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Focusable="True"
Loaded="OnLoaded">
<localView:BeWoView.CommandBindings>
<CommandBinding
CanExecute="ExcelCommand_CanExecute"
Command="local:BeWoCommands.Excel"
Executed="ExcelCommand_Executed" />
<CommandBinding
CanExecute="OpenCommand_CanExecute"
Command="ApplicationCommands.Open"
Executed="OpenCommand_Executed" />
</localView:BeWoView.CommandBindings>
<uc:ShadowChrome>
<GroupBox
x:Name="mainGroup"
Header="MainGroup"
Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox x:Name="contentGroup" Style="{StaticResource CustomerNavigationStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<Label
Margin="0,-5,0,0"
Content="Suche"
FontSize="14"
Foreground="#FFFFFFFF" />
<TextBox
x:Name="textbox_search"
Width="300"
Height="20"
MinWidth="90"
Margin="3,-5,0,0"
BorderThickness="0,0,0,0"
TabIndex="0"
Template="{DynamicResource SearchTextBoxTemplate}" />
<Button
x:Name="ReloadButton"
Width="36"
Height="24"
Margin="5,-3,0,0"
Click="ReloadButton_OnClick"
ToolTip="Liste aktualisieren">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
<Image
x:Name="imgEnabled"
Opacity="0"
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="imgEnabled" Property="Opacity" 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 Margin="10,0,0,0" Orientation="Vertical">
<TextBlock
x:Name="searchCountLabel"
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Text="{Binding Path=Items.Count, Converter={StaticResource StringFormatConverter}, ConverterParameter=Suchergebnisse: \{0\}, ElementName=objectListBox}" />
<StackPanel x:Name="sortPanel" Orientation="Horizontal">
<TextBlock
x:Name="sortLabel"
Margin="0,2,0,0"
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Text="Sortiert nach" />
<ComboBox
x:Name="sortCombo"
MinWidth="100"
Margin="10,0,0,0"
HorizontalAlignment="Left"
DisplayMemberPath="DisplayName"
FontFamily="Microsoft Sans Serif"
FontSize="12"
SelectionChanged="sortCombo_SelectionChanged"
Style="{DynamicResource SortComboBox}" />
<ToggleButton
x:Name="sortDirectionToggleButton"
Click="sortDirectionToggleButton_Click"
Style="{DynamicResource SortDirectionToggleButtonStyle}" />
<CheckBox
x:Name="chkShowArchived"
Margin="10,0,0,0"
VerticalAlignment="Center"
Content=" Archivierte Objekte anzeigen"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="{DynamicResource MainGroupBoxForegroundBrush}" />
<CheckBox
x:Name="chkShowDeleted"
Margin="10,0,0,0"
VerticalAlignment="Center"
Content=" Gelöschte Objekte anzeigen"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="{DynamicResource MainGroupBoxForegroundBrush}" />
</StackPanel>
</StackPanel>
<ListBox
x:Name="objectListBox"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
MinWidth="200"
MinHeight="200"
Margin="10,10,0,20"
AlternationCount="-1"
Background="{x:Null}"
IsSynchronizedWithCurrentItem="True"
MouseDoubleClick="objectListBox_MouseDoubleClick"
SelectionChanged="objectListBox_SelectionChanged"
Style="{StaticResource NavigationListStyle}"
TabIndex="1">
<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 AncestorType="{x:Type localNavView:MainNavigationView}" Mode="FindAncestor" />
</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"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Text=" Zuletzt angesehen" />
<Path
Margin="0,3,0,0"
Data="M 0,0 H 250"
Fill="{DynamicResource LightOrangeBrush}"
Stroke="#FFFB6F0E"
StrokeThickness="2" />
<ListBox
x:Name="objectHistoryListBox"
MinWidth="200"
Margin="0,5,0,20"
AlternationCount="-1"
Background="{x:Null}"
IsSynchronizedWithCurrentItem="True"
MouseDoubleClick="objectHistoryListBox_MouseDoubleClick"
SelectionChanged="objectListBox_SelectionChanged"
Style="{StaticResource NavigationListStyle}"
TabIndex="1" />
</StackPanel>
<StackPanel
x:Name="stackPanle_details"
Grid.Row="1"
Margin="0,10,0,0"
Visibility="Hidden">
<TextBlock
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Text="Details " />
<Path
Margin="0,3,0,0"
Data="M 0,0 H 250"
Fill="{DynamicResource LightOrangeBrush}"
Stroke="#FFFB6F0E"
StrokeThickness="2" />
<ContentPresenter x:Name="details_presenter" />
</StackPanel>
</Grid>
<Border
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="3"
Height="40"
Margin="0,10,0,0"
VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="3"
Height="40"
Margin="5,10,0,0"
VerticalAlignment="Stretch"
Orientation="Horizontal">
<Button
x:Name="btnNew"
Margin="3,0,0,0"
Click="btnNew_Click"
Content="Neu"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnImport"
Margin="3,0,0,0"
Click="btnImport_Click"
Content="Importieren"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Collapsed" />
<Button
x:Name="btnCopy"
Margin="10,0,0,0"
Click="btnCopy_Click"
Content="Kopieren"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Collapsed" />
<Button
x:Name="btnEdit"
Margin="10,0,0,0"
Click="btnEdit_Click"
Content="Öffnen"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnArchive"
Margin="10,0,0,0"
Click="btnArchive_Click"
Content="Archivieren"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnDelete"
Margin="10,0,0,0"
Click="btnDelete_Click"
Content="Löschen"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<StackPanel Margin="0" Orientation="Horizontal">
<StackPanel.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</StackPanel.Resources>
<Button
x:Name="btnOpenAi2"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiWindowCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Window"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnOpenAi3"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiPopupCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Popup"
Style="{StaticResource NavigationToolbarButtonStyle}" />
</StackPanel>
<TextBlock
x:Name="textblock_link"
Margin="20,0,0,0"
VerticalAlignment="Center"
FontSize="16">
<Hyperlink
x:Name="linkExcelExport"
Foreground="White"
RequestNavigate="linkExcelExport_RequestNavigate"
TargetName="newWindow">
Excel Export
</Hyperlink>
</TextBlock>
<TextBlock
x:Name="textblock_print"
Margin="20,0,0,0"
VerticalAlignment="Center"
FontSize="16">
<Hyperlink
x:Name="linkPrint"
Foreground="White"
NavigateUri="http://www.ownsoft.de"
RequestNavigate="linkPrint_RequestNavigate"
TargetName="newWindow">
Liste drucken
</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>