From 8d87f61c076fc73f46006ebaafcbeffef05c589e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E7=AB=B9?= Date: Sat, 18 Mar 2023 22:50:00 +0800 Subject: [PATCH] mind --- .../Converters/ObjectConverter.cs | 30 +++++++++++++ .../Controls/ToolBoxControl.xaml | 43 ++++++++++++++++--- AIStudio.Wpf.Mind/Themes/MindNode.xaml | 6 +-- .../ViewModels/MindDiagramViewModel.cs | 20 ++++++++- AIStudio.Wpf.Mind/ViewModels/MindNode.cs | 40 ++++++++++++----- 5 files changed, 117 insertions(+), 22 deletions(-) create mode 100644 AIStudio.Wpf.DiagramDesigner/Converters/ObjectConverter.cs diff --git a/AIStudio.Wpf.DiagramDesigner/Converters/ObjectConverter.cs b/AIStudio.Wpf.DiagramDesigner/Converters/ObjectConverter.cs new file mode 100644 index 0000000..88e3f99 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner/Converters/ObjectConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Data; + +namespace AIStudio.Wpf.DiagramDesigner +{ + /// + /// CommandParameter 多参数传递 + /// + public class ObjectConverter : IMultiValueConverter + { + #region IMultiValueConverter Members + + public object Convert(object[] values, Type targetType, + object parameter, System.Globalization.CultureInfo culture) + { + return values?.ToArray(); + } + + public object[] ConvertBack(object value, Type[] targetTypes, + object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + + #endregion + } +} diff --git a/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml b/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml index 60cc950..d188dda 100644 --- a/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml +++ b/AIStudio.Wpf.Mind/Controls/ToolBoxControl.xaml @@ -16,6 +16,7 @@ + @@ -119,7 +120,22 @@ - + + + + + + + + + + + + + + + + @@ -131,7 +147,22 @@ - + + + + + + + + + + + + + + + + @@ -457,19 +488,19 @@ - - -