Browse Source

Fixed Issue with TimeStamp Editors triggering unnecessary changes
Tweaked VerticalDynamicGridLayout margins

frogsoftware 1 year ago
parent
commit
6d57d0dc26

+ 2 - 3
inabox.wpf/DynamicGrid/Editors/TimestampEditor/TimestampEditorControl.cs

@@ -46,9 +46,7 @@ namespace InABox.DynamicGrid
                 Width = 150
             };
             Editor.SetValue(DockPanel.DockProperty, Dock.Left);
-            Editor.ValueChanged += (o, e) => CheckChanged();
-
-
+            
             Button = new Button
             {
                 Content = "Set",
@@ -72,6 +70,7 @@ namespace InABox.DynamicGrid
             else
                 Editor.Value = null;
             Button.Content = Editor.Value.HasValue ? "Clear" : "Set";
+            CheckChanged();
         }
 
         public override int DesiredHeight()

+ 2 - 0
inabox.wpf/DynamicGrid/Layouts/VerticalDynamicEditorGridLayout.xaml.cs

@@ -40,6 +40,8 @@ namespace InABox.DynamicGrid
             {
                 var tab = new DynamicTabItem();
                 tab.Header = page.Caption();
+                if (page is FrameworkElement element)
+                    element.Margin  = new Thickness(0, 2, 0, 0);
                 tab.Content = page;
 
                 if(page is DynamicEditorGrid.DynamicEditPage)