fix(layout): clamp mainwindow content to rounded corners

This commit is contained in:
Meik
2026-03-05 16:20:03 +01:00
parent 66902623d9
commit ea3724c714
3 changed files with 7 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
- Hauptlayout von festen `Window.ActualWidth`-Bindings entkoppelt, damit Header/Content nicht über die gerundete Innenfläche hinausragen.
- Feste Hauptlayout-Höhen (Navigation/Content) auf die verfügbare Innenhöhe abgestimmt und Clipping im Dock-Bereich aktiviert, damit keine Inhalte in die Rundungsbereiche überlaufen.
- Initialisierung des Rounded-Clips auf den finalen Layout-Zeitpunkt erweitert (Loaded/Render), damit die Rundungsbegrenzung stabil greift.
- MainWindow-Ecküberstände beseitigt: Navigation-Rail unten links an den Fensterradius angepasst, Content-Bereich im `DockPanel` als Fill-Element geführt und zusätzlicher Surface-Clip auf Radius `20` gesetzt.
### Navigation und Interaktion
- Navigation-Buttons neu ausgerichtet (horizontal/vertikal), Icons vergrößert und Zustände vereinheitlicht.

View File

@@ -495,7 +495,6 @@
<StackPanel Orientation="Horizontal"
Width="75"
Height="576"
DockPanel.Dock="Top"
ClipToBounds="True"
x:Name="btnSP"
HorizontalAlignment="Left">
@@ -510,7 +509,7 @@
Canvas.Top="8"
Width="75"
Height="568"
CornerRadius="20,0,0,0"
CornerRadius="20,0,0,20"
BorderThickness="1"
BorderBrush="{DynamicResource navigationRailBorderColor}"
Background="{DynamicResource navigationRailColor}" />

View File

@@ -2175,17 +2175,20 @@ namespace C4IT_CustomerPanel
if (MainWindowSurface == null || MainWindowContentRoot == null || MainGrid == null)
return;
double surfaceWidth = MainWindowSurface.ActualWidth;
double surfaceHeight = MainWindowSurface.ActualHeight;
double contentWidth = MainWindowContentRoot.ActualWidth;
double contentHeight = MainWindowContentRoot.ActualHeight;
if (contentWidth <= 0 || contentHeight <= 0)
if (surfaceWidth <= 0 || surfaceHeight <= 0 || contentWidth <= 0 || contentHeight <= 0)
return;
const double surfaceRadius = 20d;
const double contentRadius = 19d;
MainGrid.Clip = null;
this.Clip = null;
MainWindowSurface.Clip = null;
MainWindowSurface.Clip = new RectangleGeometry(new Rect(0d, 0d, surfaceWidth, surfaceHeight), surfaceRadius, surfaceRadius);
MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);
_mainSurfaceClipInitialized = true;