Explorar el Código

Tidied up DynamicSplitPanel and Filter Editor crash

frogsoftware hace 1 año
padre
commit
e73c1dc2b2

+ 2 - 1
inabox.wpf/DynamicGrid/Editors/FilterEditor/Nodes/ValueNodes/IntegerValueNode.cs

@@ -1,3 +1,4 @@
+using System;
 using InABox.Core;
 using Syncfusion.Windows.Shared;
 
@@ -11,7 +12,7 @@ public class IntegerValueNode : ValueNode {
         get => Editor.Value; 
         set {
             if (value?.GetType().IsOrdinal() == true)
-                Editor.Value = (long)value;
+                Editor.Value = Convert.ToInt64(value);
             else if (value is string str && long.TryParse(str, out var num))
                 Editor.Value = num;
             else

+ 5 - 5
inabox.wpf/Themes/Generic.xaml

@@ -63,12 +63,12 @@
 
                             <Button DockPanel.Dock="Top" x:Name="PART_DetailsOnly" BorderBrush="Gray"
                                     BorderThickness="0.75,0.75,0.75,0" Margin="0" Background="WhiteSmoke" MinHeight="25"
-                                    MinWidth="25">
+                                    Width="25" Focusable="False" >
                                 <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
                             </Button>
 
                             <Border DockPanel.Dock="Top" BorderBrush="Gray" BorderThickness="0.75,0,0.75,0.75" Margin="0,0,0,0"
-                                    Background="WhiteSmoke">
+                                    Background="WhiteSmoke" Width="25">
                                 <Label x:Name="PART_MasterHeader"
                                        Content="{Binding MasterCaption, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:DynamicSplitPanel}}"
                                        HorizontalContentAlignment="Right">
@@ -84,13 +84,13 @@
                             <Button x:Name="PART_CombinedRight" BorderBrush="Gray" BorderThickness="0.75"
                                     Margin="2,0,0,2" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
                                     MinHeight="25" HorizontalContentAlignment="Center"
-                                    VerticalContentAlignment="Center">
+                                    VerticalContentAlignment="Center" Focusable="False">
                                 <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
                             </Button>
 
                             <Button x:Name="PART_CombinedLeft" BorderBrush="Gray" BorderThickness="0.75"
                                     Margin="2,0,0,2" Background="WhiteSmoke" DockPanel.Dock="Right" MinWidth="25"
-                                    MinHeight="25">
+                                    MinHeight="25" Focusable="False">
                                 <Polygon Points="8,0 0,5, 8,10" Stroke="Gray" Fill="Silver" />
                             </Button>
 
@@ -166,7 +166,7 @@
 
                             <Button DockPanel.Dock="Top" x:Name="PART_MasterOnly" BorderBrush="Gray"
                                     BorderThickness="0.75,0.75,0.75,0" Margin="0" Background="WhiteSmoke" MinHeight="25"
-                                    MinWidth="25">
+                                    MinWidth="25" Focusable="False">
                                 <Polygon Points="8,0 0,5, 8,10" Stroke="Gray" Fill="Silver" />
                             </Button>