Revert "优化代码"

This reverts commit 92bb458345.
This commit is contained in:
2025-09-30 19:15:03 +08:00
parent d9e3524211
commit a9b0ac0595
16 changed files with 131 additions and 71 deletions
+3 -2
View File
@@ -85,8 +85,9 @@ namespace Ink_Canvas
// 根据橡皮擦形状选择对应的图像资源
string resourceKey = isEraserCircleShape ? "EllipseEraserImageSource" : "RectangleEraserImageSource";
if (TryFindResource(resourceKey) is DrawingImage imageSource)
var imageSource = TryFindResource(resourceKey) as DrawingImage;
if (imageSource != null)
{
eraserFeedback.Source = imageSource;
}