fix(layout): clamp mainwindow content to rounded corners
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
- Hauptlayout von festen `Window.ActualWidth`-Bindings entkoppelt, damit Header/Content nicht über die gerundete Innenfläche hinausragen.
|
- 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.
|
- 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.
|
- 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 und Interaktion
|
||||||
- Navigation-Buttons neu ausgerichtet (horizontal/vertikal), Icons vergrößert und Zustände vereinheitlicht.
|
- Navigation-Buttons neu ausgerichtet (horizontal/vertikal), Icons vergrößert und Zustände vereinheitlicht.
|
||||||
|
|||||||
@@ -495,7 +495,6 @@
|
|||||||
<StackPanel Orientation="Horizontal"
|
<StackPanel Orientation="Horizontal"
|
||||||
Width="75"
|
Width="75"
|
||||||
Height="576"
|
Height="576"
|
||||||
DockPanel.Dock="Top"
|
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
x:Name="btnSP"
|
x:Name="btnSP"
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
@@ -510,7 +509,7 @@
|
|||||||
Canvas.Top="8"
|
Canvas.Top="8"
|
||||||
Width="75"
|
Width="75"
|
||||||
Height="568"
|
Height="568"
|
||||||
CornerRadius="20,0,0,0"
|
CornerRadius="20,0,0,20"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
||||||
Background="{DynamicResource navigationRailColor}" />
|
Background="{DynamicResource navigationRailColor}" />
|
||||||
|
|||||||
@@ -2175,17 +2175,20 @@ namespace C4IT_CustomerPanel
|
|||||||
if (MainWindowSurface == null || MainWindowContentRoot == null || MainGrid == null)
|
if (MainWindowSurface == null || MainWindowContentRoot == null || MainGrid == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
double surfaceWidth = MainWindowSurface.ActualWidth;
|
||||||
|
double surfaceHeight = MainWindowSurface.ActualHeight;
|
||||||
double contentWidth = MainWindowContentRoot.ActualWidth;
|
double contentWidth = MainWindowContentRoot.ActualWidth;
|
||||||
double contentHeight = MainWindowContentRoot.ActualHeight;
|
double contentHeight = MainWindowContentRoot.ActualHeight;
|
||||||
if (contentWidth <= 0 || contentHeight <= 0)
|
if (surfaceWidth <= 0 || surfaceHeight <= 0 || contentWidth <= 0 || contentHeight <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const double surfaceRadius = 20d;
|
||||||
const double contentRadius = 19d;
|
const double contentRadius = 19d;
|
||||||
|
|
||||||
MainGrid.Clip = null;
|
MainGrid.Clip = null;
|
||||||
this.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);
|
MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);
|
||||||
|
|
||||||
_mainSurfaceClipInitialized = true;
|
_mainSurfaceClipInitialized = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user