diff --git a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml
index b81c9b7..6673de3 100644
--- a/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml
+++ b/AIStudio.Wpf.DiagramDesigner/UserControls/DiagramControl.xaml
@@ -426,10 +426,6 @@
Value="true">
-
-
-
@@ -466,8 +462,8 @@
Value="{Binding Area.Left}" />
-
+
@@ -641,9 +637,6 @@
-
-
-
@@ -768,10 +761,6 @@
Value="true">
-
-
-
-
@@ -822,9 +811,6 @@
Value="true">
-
-
-
diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/AdditionViewModel/FontViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/AdditionViewModel/FontViewModel.cs
index 5a695bf..87ca138 100644
--- a/AIStudio.Wpf.DiagramDesigner/ViewModels/AdditionViewModel/FontViewModel.cs
+++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/AdditionViewModel/FontViewModel.cs
@@ -88,7 +88,7 @@ namespace AIStudio.Wpf.DiagramDesigner
FontCase = FontCase.None;
HorizontalAlignment = HorizontalAlignment.Center;
VerticalAlignment = VerticalAlignment.Center;
- LineHeight = 0;
+ LineHeight = Double.NaN;
});
}
}
@@ -458,7 +458,7 @@ namespace AIStudio.Wpf.DiagramDesigner
}
}
- private double _lineHeight;
+ private double _lineHeight = Double.NaN;
public double LineHeight
{
get
diff --git a/AIStudio.Wpf.Mind/Controls/ColorPicker.xaml b/AIStudio.Wpf.Mind/Controls/ColorPicker.xaml
index c63d1e2..dcc74cd 100644
--- a/AIStudio.Wpf.Mind/Controls/ColorPicker.xaml
+++ b/AIStudio.Wpf.Mind/Controls/ColorPicker.xaml
@@ -7,35 +7,34 @@
- M0,0 L3,0 4.5,1.5 6,0 9,0 4.5,4.5 z
+ M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z
+
+
+
+
\ No newline at end of file
diff --git a/AIStudio.Wpf.Mind/Controls/OpenFileTextBox.xaml.cs b/AIStudio.Wpf.Mind/Controls/OpenFileTextBox.xaml.cs
new file mode 100644
index 0000000..e7d1535
--- /dev/null
+++ b/AIStudio.Wpf.Mind/Controls/OpenFileTextBox.xaml.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using Microsoft.Win32;
+
+namespace AIStudio.Wpf.Mind.Controls
+{
+ [TemplatePart(Name = PART_OpenButton, Type = typeof(Button))]
+ public class OpenFileTextBox : TextBox
+ {
+ private const string PART_OpenButton = "PART_OpenButton";
+ private Button _openButton;
+
+ static OpenFileTextBox()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(OpenFileTextBox), new FrameworkPropertyMetadata(typeof(OpenFileTextBox)));
+ }
+
+ /// Identifies the dependency property.
+ public static readonly DependencyProperty FilterProperty
+ = DependencyProperty.Register(nameof(Filter), typeof(string), typeof(OpenFileTextBox), new UIPropertyMetadata("图像文件(*.bmp, *.jpg)|*.bmp;*.jpg|所有文件(*.*)|*.*"));
+
+ ///
+ /// Whether or not the "popup" menu for this control is currently open
+ ///
+ public string Filter
+ {
+ get => (string)this.GetValue(FilterProperty);
+ set => this.SetValue(FilterProperty, (string)value);
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ if (_openButton != null)
+ {
+ _openButton.Click -= _openButton_Click;
+ }
+
+ _openButton = this.Template.FindName(PART_OpenButton, this) as Button;
+
+ if (_openButton != null)
+ {
+ _openButton.Click += _openButton_Click;
+ }
+ }
+
+ private void _openButton_Click(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog fd = new OpenFileDialog();
+ fd.Title = "请选择文件";
+ fd.Filter = Filter;
+ fd.FileName = Text?.Trim();
+ if (fd.ShowDialog() == true)
+ {
+ SetValue(TextProperty, fd.FileName);
+ }
+ //this.Focus();
+ }
+ }
+}
diff --git a/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml b/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml
index d188dda..cb58bf3 100644
--- a/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml
+++ b/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml
@@ -122,11 +122,11 @@
-
+
-
+