Selaa lähdekoodia

Expression editor improvements

Kenric Nugteren 2 vuotta sitten
vanhempi
commit
af9085f6c2

+ 3 - 2
InABox.DynamicGrid/Editors/ExpressionEditor/ExpressionEditorWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:InABox.DynamicGrid"
         mc:Ignorable="d"
-        Title="Expression Editor" Height="450" Width="800"
+        Title="Expression Editor" Height="650" Width="800"
         Loaded="ExpressionWindow_Loaded"
         x:Name="ExpressionWindow">
     <Grid Margin="5">
@@ -19,6 +19,7 @@
         </Grid.RowDefinitions>
         <TextBox x:Name="Editor"
                  Grid.Column="0" Grid.Row="0" Grid.RowSpan="2"
+                 Background="LightYellow"
                  BorderThickness="1,1,0,1"
                  Padding="5"
                  FontFamily="Consolas" FontSize="12"
@@ -67,7 +68,7 @@
                     <Border BorderThickness="0,0,0,1" BorderBrush="LightGray"
                             Margin="0,5,0,0"
                             Padding="5">
-                        <Expander Header="Variables">
+                        <Expander Header="Variables" IsExpanded="True">
                             <ListBox ItemsSource="{Binding Path=Variables,ElementName=ExpressionWindow}"
                                      HorizontalContentAlignment="Stretch"
                                      BorderThickness="0">

+ 12 - 1
InABox.DynamicGrid/Editors/FilterEditor/FilterEditorWindow.xaml.cs

@@ -535,9 +535,20 @@ namespace InABox.DynamicGrid
             set
             {
                 if (value is Guid guid || (value is string str && Guid.TryParse(str, out guid)))
-                    Editor.Text = guid.ToString();
+                {
+                    if(guid == Guid.Empty)
+                    {
+                        Editor.Text = "";
+                    }
+                    else
+                    {
+                        Editor.Text = guid.ToString();
+                    }
+                }
                 else
+                {
                     Editor.Text = "";
+                }
             }
         }