Skip to content

Commit 632097d

Browse files
committed
fix: Update StackPanel Spacing styles in WpfUiCustom.xaml theme
## Problem The WpfUiCustom.xaml theme file contained 3 StackPanel styles that used Property="Spacing", which doesn't exist in WPF StackPanel: - StandardSpacing (Spacing=12) - CompactSpacing (Spacing=8) - WideSpacing (Spacing=16) These styles were causing XAML build errors at lines 68, 72, and 76. ## Solution 1. Added xmlns:helpers namespace to ResourceDictionary with assembly reference 2. Updated all 3 style definitions to use helpers:StackPanelHelper.Spacing attached property instead of Property="Spacing" ## Files Changed - Themes/WpfUiCustom.xaml ## Result All StackPanel spacing styles now use the WPF-compatible StackPanelHelper attached property, maintaining the same spacing values and functionality.
1 parent dcdf1a5 commit 632097d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Themes/WpfUiCustom.xaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml">
3+
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
4+
xmlns:helpers="clr-namespace:PrettyScreenSHOT.Helpers;assembly=PrettyScreenSHOT">
45

56
<!--
67
Custom WPF UI Styles for PrettyScreenSHOT
@@ -63,17 +64,17 @@
6364
<Setter Property="Margin" Value="0,0,0,8"/>
6465
</Style>
6566

66-
<!-- StackPanel with consistent spacing -->
67+
<!-- StackPanel with consistent spacing using Attached Property -->
6768
<Style x:Key="StandardSpacing" TargetType="StackPanel">
68-
<Setter Property="Spacing" Value="12"/>
69+
<Setter Property="helpers:StackPanelHelper.Spacing" Value="12"/>
6970
</Style>
7071

7172
<Style x:Key="CompactSpacing" TargetType="StackPanel">
72-
<Setter Property="Spacing" Value="8"/>
73+
<Setter Property="helpers:StackPanelHelper.Spacing" Value="8"/>
7374
</Style>
7475

7576
<Style x:Key="WideSpacing" TargetType="StackPanel">
76-
<Setter Property="Spacing" Value="16"/>
77+
<Setter Property="helpers:StackPanelHelper.Spacing" Value="16"/>
7778
</Style>
7879

7980
<!-- Section separator -->

0 commit comments

Comments
 (0)