Selaa lähdekoodia

Fix to vertical grid layout that puts a max height on the editor row.

Kenric Nugteren 1 vuosi sitten
vanhempi
commit
41c9cfcb14

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

@@ -7,9 +7,9 @@
              xmlns:sf="http://schemas.syncfusion.com/wpf"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
-    <Grid>
+    <Grid SizeChanged="Grid_SizeChanged">
         <Grid.RowDefinitions>
-            <RowDefinition Height="Auto"/>
+            <RowDefinition x:Name="EditorRow" Height="Auto"/>
             <RowDefinition Height="Auto"/>
             <RowDefinition Height="*"/>
         </Grid.RowDefinitions>

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

@@ -77,5 +77,10 @@ namespace InABox.DynamicGrid
                 bChanging = false;
             }
         }
+
+        private void Grid_SizeChanged(object sender, SizeChangedEventArgs e)
+        {
+            EditorRow.MaxHeight = e.NewSize.Height - 50;
+        }
     }
 }