Revert "Revert "block 可以拖拽到内部,还有少量问题待解决""

This reverts commit fcd7beb193.
This commit is contained in:
艾竹
2023-06-11 23:58:22 +08:00
parent fcd7beb193
commit 5a9bcc03f3
73 changed files with 7132 additions and 242 deletions

View File

@@ -9,10 +9,33 @@ namespace AIStudio.Wpf.DiagramDesigner
// Wraps info of the dragged object into a class
public class DragObject
{
public Size? DesiredSize { get; set; }
public Type ContentType { get; set; }
public string Icon { get; set; }
public IColorViewModel ColorViewModel { get; set; }
public object DesignerItem { get; set; }
public Size? DesiredSize
{
get; set;
}
public Size? DesiredMinSize
{
get; set;
}
public Type ContentType
{
get; set;
}
public string Icon
{
get; set;
}
public string Text
{
get; set;
}
public IColorViewModel ColorViewModel
{
get; set;
}
public object DesignerItem
{
get; set;
}
}
}

View File

@@ -36,6 +36,10 @@ namespace AIStudio.Wpf.DiagramDesigner
{
get; set;
}
public Size? DesiredMinSize
{
get; set;
}
public string Description
{
get; set;
@@ -46,7 +50,7 @@ namespace AIStudio.Wpf.DiagramDesigner
get; set;
}
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null, string description = null)
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null, Size? desiredMinSize = null, string description = null)
{
this.Text = text;
this.Icon = icon;
@@ -54,6 +58,7 @@ namespace AIStudio.Wpf.DiagramDesigner
this.Width = width;
this.Height = height;
this.DesiredSize = desiredSize;
this.DesiredMinSize = desiredMinSize;
this.ColorViewModel = new ColorViewModel();
this.Description = description;
}