Skip to content

Commit fa05b44

Browse files
authored
Enhance FlexPanel layout system with Grow, Spacing, and alignment improvements (#15)
- Improved JustifyContent logic, removed deprecated SpaceAuto - Added AlignContent support for SpaceBetween, SpaceAround, and SpaceEvenly - Implemented AlignItems (Start, Center, End, Stretch) - Introduced Spacing property (disabled for Space* alignments) - Added Grow (flex-grow) support for proportional resizing - Changed default layout behavior to Wrap mode - Preview layout improved for better alignment visualization - Added caution for layout inconsistencies when mixing unsupported alignment combinations
1 parent 0d2c72c commit fa05b44

File tree

4 files changed

+726
-779
lines changed

4 files changed

+726
-779
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
using System.Windows;
3+
using System.Windows.Controls;
4+
5+
namespace OpenSilver.ControlsKit
6+
{
7+
public partial class FlexPanel : Panel
8+
{
9+
public static readonly DependencyProperty GrowProperty =
10+
DependencyProperty.RegisterAttached (
11+
"Grow",
12+
typeof (double),
13+
typeof (FlexPanel),
14+
new FrameworkPropertyMetadata (0.0, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsArrange));
15+
16+
public static void SetGrow(UIElement element, double value) => element.SetValue (GrowProperty, value);
17+
public static double GetGrow(UIElement element) => (double)element.GetValue (GrowProperty);
18+
}
19+
}

0 commit comments

Comments
 (0)