196 lines
11 KiB
XML
196 lines
11 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:shell="using:PolyTrader.App.Avalonia.Shell"
|
||
x:Class="PolyTrader.App.Avalonia.Views.ShellWindow"
|
||
x:DataType="shell:ShellNavModel"
|
||
Title="PolyTrader"
|
||
Icon="avares://PolyTrader.App.Avalonia/Assets/icon.png"
|
||
Width="1600" Height="900"
|
||
WindowState="Maximized">
|
||
|
||
<!--
|
||
Das einzige Anwendungsfenster. Alle Ansichten (Startseite, Dashboard, Modul-Seiten,
|
||
Einstellungen, Jobs, Terminal) sind UserControls und werden in „pageHost" gehängt –
|
||
Nachfolger der früheren Mehrfenster-Shell mit WindowMenuBar auf jedem Fenster.
|
||
|
||
Aufbau nach dem Claude-Design-Mockup „PolyTrader UI Redesign":
|
||
· links eine einklappbare Seitenleiste mit gruppierter Navigation
|
||
· oben Kopfzeile mit Seitentitel und Farbschema-Umschalter
|
||
· darunter die Benachrichtigungsleiste (Warnungen/Fehler, wegklickbar)
|
||
· unten die Statusleiste (Trading, Module, API, Farbschema)
|
||
|
||
Layout vollständig deklarativ (Layout-Regel des Projekts). Das Code-Behind verdrahtet nur:
|
||
Seitenwechsel, Umschalter, Statuswerte und die Benachrichtigungen.
|
||
-->
|
||
|
||
<Grid ColumnDefinitions="Auto,*">
|
||
|
||
<!-- ══ Seitenleiste ══════════════════════════════════════════════════════════ -->
|
||
<Border Grid.Column="0"
|
||
Width="{Binding SidebarWidth}"
|
||
Background="{DynamicResource AppSurfaceBrush}"
|
||
BorderBrush="{DynamicResource AppDividerBrush}"
|
||
BorderThickness="0,0,1,0">
|
||
<DockPanel>
|
||
|
||
<!-- Marke + Einklappen -->
|
||
<Border DockPanel.Dock="Top"
|
||
BorderBrush="{DynamicResource AppDividerBrush}"
|
||
BorderThickness="0,0,0,1"
|
||
Padding="12,11">
|
||
<DockPanel>
|
||
<Button DockPanel.Dock="Right"
|
||
Name="btnCollapse"
|
||
Classes="ghost"
|
||
Content="{Binding CollapseGlyph}"
|
||
ToolTip.Tip="{Binding CollapseToolTip}"
|
||
Width="22" Height="22" Padding="0"
|
||
VerticalAlignment="Center"
|
||
HorizontalContentAlignment="Center" />
|
||
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
||
<!-- Bildmarke des Mockups: aufsteigende Kurve mit Pfeilecke. -->
|
||
<Viewbox Width="19" Height="19" VerticalAlignment="Center">
|
||
<Canvas Width="24" Height="24">
|
||
<Path Data="M22 7 L13.5 15.5 L8.5 10.5 L2 17"
|
||
Stroke="{DynamicResource AppAccentBrush}" StrokeThickness="1.6" />
|
||
<Path Data="M16 7 H22 V13"
|
||
Stroke="{DynamicResource AppAccentBrush}" StrokeThickness="1.6" />
|
||
</Canvas>
|
||
</Viewbox>
|
||
<TextBlock Text="PolyTrader" Classes="h5"
|
||
VerticalAlignment="Center"
|
||
IsVisible="{Binding LabelsVisible}" />
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- Fußzeile: Beenden + Version -->
|
||
<Border DockPanel.Dock="Bottom"
|
||
BorderBrush="{DynamicResource AppDividerBrush}"
|
||
BorderThickness="0,1,0,0"
|
||
Padding="10,8">
|
||
<StackPanel Spacing="6">
|
||
<Button Name="btnQuit" Classes="nav"
|
||
Classes.icononly="{Binding !LabelsVisible}"
|
||
ToolTip.Tip="PolyTrader beenden (mit Sicherheitsabfrage)">
|
||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||
<TextBlock Text="⏻" FontSize="14" VerticalAlignment="Center" />
|
||
<TextBlock Text="Beenden" VerticalAlignment="Center"
|
||
IsVisible="{Binding LabelsVisible}" />
|
||
</StackPanel>
|
||
</Button>
|
||
<TextBlock Name="lblVersion" Classes="muted" FontSize="10.5"
|
||
Margin="9,0,0,0"
|
||
IsVisible="{Binding LabelsVisible}" />
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- Navigation: Abschnitte, darin die Seiten -->
|
||
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
|
||
<ItemsControl ItemsSource="{Binding Groups}" Margin="8,14">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="shell:ShellNavGroup">
|
||
<StackPanel Margin="0,0,0,16">
|
||
<TextBlock Text="{Binding Title}"
|
||
Classes="navgroup"
|
||
IsVisible="{Binding LabelsVisible}" />
|
||
<ItemsControl ItemsSource="{Binding Entries}">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="shell:ShellNavEntry">
|
||
<Button Classes="nav"
|
||
Classes.active="{Binding IsActive}"
|
||
Classes.icononly="{Binding IconOnly}"
|
||
IsEnabled="{Binding IsAvailable}"
|
||
Command="{Binding Command}"
|
||
ToolTip.Tip="{Binding ToolTip}"
|
||
ToolTip.ShowOnDisabled="True">
|
||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||
<Image Source="{Binding Icon}"
|
||
Width="18" Height="18"
|
||
VerticalAlignment="Center"
|
||
IsVisible="{Binding Icon, Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||
<TextBlock Text="{Binding Title}"
|
||
VerticalAlignment="Center"
|
||
IsVisible="{Binding LabelsVisible}" />
|
||
</StackPanel>
|
||
</Button>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</StackPanel>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</ScrollViewer>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- ══ Hauptbereich ══════════════════════════════════════════════════════════ -->
|
||
<DockPanel Grid.Column="1">
|
||
|
||
<!-- Kopfzeile -->
|
||
<Border DockPanel.Dock="Top"
|
||
BorderBrush="{DynamicResource AppDividerBrush}"
|
||
BorderThickness="0,0,0,1"
|
||
Padding="20,12">
|
||
<DockPanel>
|
||
<Button DockPanel.Dock="Right"
|
||
Name="btnTheme"
|
||
Classes="ghost"
|
||
Width="30" Height="30" Padding="0"
|
||
HorizontalContentAlignment="Center"
|
||
VerticalAlignment="Center" />
|
||
<TextBlock Text="{Binding PageTitle}" Classes="h4" VerticalAlignment="Center" />
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- Benachrichtigungen (nur sichtbar, wenn welche anliegen) -->
|
||
<Border Name="pnlNotifications" DockPanel.Dock="Top"
|
||
IsVisible="False"
|
||
BorderBrush="{DynamicResource AppDividerBrush}"
|
||
BorderThickness="0,0,0,1">
|
||
<ItemsControl Name="notifications">
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate x:DataType="shell:ShellNotification">
|
||
<Border Classes="notify" Classes.error="{Binding IsError}" Margin="0,0,0,1">
|
||
<DockPanel>
|
||
<Button DockPanel.Dock="Right"
|
||
Classes="ghost"
|
||
Content="✕" FontSize="11"
|
||
Width="20" Height="20" Padding="0"
|
||
HorizontalContentAlignment="Center"
|
||
Command="{Binding Dismiss}"
|
||
ToolTip.Tip="Meldung ausblenden" />
|
||
<StackPanel Orientation="Horizontal" Spacing="8" VerticalAlignment="Center">
|
||
<TextBlock Text="{Binding Source}" FontWeight="SemiBold" FontSize="12" />
|
||
<TextBlock Text="{Binding Message}" FontSize="12"
|
||
TextTrimming="CharacterEllipsis" />
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Border>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</Border>
|
||
|
||
<!-- Statusleiste -->
|
||
<Border Classes="statusbar" DockPanel.Dock="Bottom">
|
||
<DockPanel>
|
||
<TextBlock Name="lblTheme" DockPanel.Dock="Right" Text="—" />
|
||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||
<TextBlock Name="lblTrading" Text="Trading: —" />
|
||
<TextBlock Text="·" />
|
||
<TextBlock Name="lblModules" Text="Module: —" />
|
||
<TextBlock Text="·" />
|
||
<TextBlock Name="lblRatelimit" Text="API: —" />
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- Inhalt: hier hängt die aktive Seite -->
|
||
<ContentControl Name="pageHost" Margin="20,16" />
|
||
</DockPanel>
|
||
</Grid>
|
||
|
||
</Window>
|