diff --git a/AIStudio.Wpf.DiagramDesigner/Converters/NullableToVisibilityConverter.cs b/AIStudio.Wpf.DiagramDesigner/Converters/NullableToVisibilityConverter.cs
new file mode 100644
index 0000000..94389a3
--- /dev/null
+++ b/AIStudio.Wpf.DiagramDesigner/Converters/NullableToVisibilityConverter.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+using System.Windows.Data;
+using System.Windows;
+
+namespace AIStudio.Wpf.DiagramDesigner
+{
+ public class NullableToVisibilityConverter : IValueConverter
+ {
+ public Visibility NullValue { get; set; } = Visibility.Collapsed;
+ public Visibility NotNullValue { get; set; } = Visibility.Visible;
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value == null ? NullValue : NotNullValue;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return Binding.DoNothing;
+ }
+ }
+}
diff --git a/AIStudio.Wpf.Mind/AIStudio.Wpf.Mind.csproj b/AIStudio.Wpf.Mind/AIStudio.Wpf.Mind.csproj
index 3a8d4f8..a978cf4 100644
--- a/AIStudio.Wpf.Mind/AIStudio.Wpf.Mind.csproj
+++ b/AIStudio.Wpf.Mind/AIStudio.Wpf.Mind.csproj
@@ -9,7 +9,7 @@
1.0.6
- 一个Wpf的流程图控件
+ 一个Wpf的思维导图控件
diff --git a/AIStudio.Wpf.Mind/Controls/PriorityControl.xaml.cs b/AIStudio.Wpf.Mind/Controls/PriorityControl.xaml.cs
index 61717f8..a0637f9 100644
--- a/AIStudio.Wpf.Mind/Controls/PriorityControl.xaml.cs
+++ b/AIStudio.Wpf.Mind/Controls/PriorityControl.xaml.cs
@@ -27,15 +27,15 @@ namespace AIStudio.Wpf.Mind.Controls
/// Identifies the dependency property.
public static readonly DependencyProperty PriorityProperty
- = DependencyProperty.Register(nameof(Priority), typeof(double), typeof(PriorityControl));
+ = DependencyProperty.Register(nameof(Priority), typeof(double?), typeof(PriorityControl));
///
/// Whether or not the "popup" menu for this control is currently open
///
- public double Priority
+ public double? Priority
{
- get => (double)this.GetValue(PriorityProperty);
- set => this.SetValue(PriorityProperty, (double)value);
+ get => (double?)this.GetValue(PriorityProperty);
+ set => this.SetValue(PriorityProperty, (double?)value);
}
}
}
diff --git a/AIStudio.Wpf.Mind/Controls/RateControl.xaml b/AIStudio.Wpf.Mind/Controls/RateControl.xaml
index 8494db3..26b9ee1 100644
--- a/AIStudio.Wpf.Mind/Controls/RateControl.xaml
+++ b/AIStudio.Wpf.Mind/Controls/RateControl.xaml
@@ -4,11 +4,66 @@