Use simple using
MODIFY
WalletWasabi.Fluent/Controls/BlurBehind.cs
WalletWasabi.Fluent/Controls/BlurBehind.cs
@@ -55,17 +55,12 @@ public class BlurBehind : Control
using var backgroundSnapshot = skia.SkSurface.Snapshot();
- using (var preBlur =
+ using var preBlur =
DrawingContextHelper.CreateDrawingContext(
new Size(backgroundSnapshot.Width, backgroundSnapshot.Height), new Vector(96, 96),
- skia.GrContext))
- {
- using (var filter =
- SKImageFilter.CreateBlur((int) _blurRadius.X, (int) _blurRadius.Y, SKShaderTileMode.Clamp))
- using (var blurPaint = new SKPaint
- {
- ImageFilter = filter,
- })
+ skia.GrContext);
+ using (var filter = SKImageFilter.CreateBlur((int)_blurRadius.X, (int)_blurRadius.Y, SKShaderTileMode.Clamp))
+ using (var blurPaint = new SKPaint { ImageFilter = filter })
{
var canvas = preBlur.SkSurface.Canvas;
canvas.DrawSurface(skia.SkSurface, 0f, 0f, blurPaint);
@@ -77,13 +72,8 @@ public class BlurBehind : Control
using var backdropShader = SKShader.CreateImage(preBlurredSnapshot, SKShaderTileMode.Clamp,
SKShaderTileMode.Clamp, currentInvertedTransform);
- using (var blurred =
- DrawingContextHelper.CreateDrawingContext(_bounds.Size, new Vector(96, 96), skia.GrContext))
- {
- using (var blurPaint = new SKPaint
- {
- Shader = backdropShader,
- })
+ using var blurred = DrawingContextHelper.CreateDrawingContext(_bounds.Size, new Vector(96, 96), skia.GrContext);
+ using (var blurPaint = new SKPaint { Shader = backdropShader })
{
blurred.SkSurface.Canvas.DrawRect(0, 0, (float)_bounds.Width, (float)_bounds.Height,
blurPaint);
@@ -91,8 +81,6 @@ public class BlurBehind : Control
blurred.DrawTo(skia);
}
- }
- }
public Rect Bounds => _bounds.Inflate(_blurRadius.X);

MODIFY
WalletWasabi.Fluent/Controls/Spectrum/SpectrumControl.cs
WalletWasabi.Fluent/Controls/Spectrum/SpectrumControl.cs
@@ -33,7 +33,6 @@ public class SpectrumControl : TemplatedControl, ICustomDrawOperation
public SpectrumControl()
{
-
_data = new float[NumBins];
_auraSpectrumDataSource = new AuraSpectrumDataSource(NumBins);
_splashEffectDataSource = new SplashEffectDataSource(NumBins);
@@ -152,18 +151,13 @@ public class SpectrumControl : TemplatedControl, ICustomDrawOperation
return;
}
- using (var barsLayer =
- DrawingContextHelper.CreateDrawingContext(bounds.Size, new Vector(96, 96), skia.GrContext))
- {
+ using var barsLayer = DrawingContextHelper.CreateDrawingContext(bounds.Size, new Vector(96, 96), skia.GrContext);
RenderBars(barsLayer);
- using (var filter = SKImageFilter.CreateBlur(24, 24, SKShaderTileMode.Clamp))
- using (var paint = new SKPaint { ImageFilter = filter })
- {
+ using var filter = SKImageFilter.CreateBlur(24, 24, SKShaderTileMode.Clamp);
+ using var paint = new SKPaint { ImageFilter = filter };
barsLayer.DrawTo(skia, paint);
}
- }
- }
bool IEquatable<ICustomDrawOperation>.Equals(ICustomDrawOperation? other) => false;
}

Use simple using