缩略图优化

This commit is contained in:
艾竹
2024-02-08 23:00:50 +08:00
parent f5e0275a8b
commit bbb5809790
8 changed files with 33 additions and 15 deletions

View File

@@ -302,12 +302,12 @@ namespace AIStudio.Wpf.DiagramDesigner
if (e.OldValue is IDiagramViewModel oldvalue)
{
//var image = this.ToBitmap().ToBitmapSource();
//oldvalue.Thumbnail = new ImageBrush(image) { Stretch = Stretch.Uniform };
}
if (e.NewValue is IDiagramViewModel newvalue)
{
newvalue.Thumbnail = new VisualBrush(this) { Stretch = Stretch.Uniform };
if (newvalue.GenerateThumbnail)
newvalue.Thumbnail = new VisualBrush(this) { Stretch = Stretch.Uniform };
}
}