diff --git a/ZXing.Net.MAUI/BarcodeGeneratorViewHandler.cs b/ZXing.Net.MAUI/BarcodeGeneratorViewHandler.cs index c1ddb20..964d240 100644 --- a/ZXing.Net.MAUI/BarcodeGeneratorViewHandler.cs +++ b/ZXing.Net.MAUI/BarcodeGeneratorViewHandler.cs @@ -35,6 +35,10 @@ public override void PlatformArrange(Rect rect) { base.PlatformArrange(rect); + // Don't update if it's the same size, otherwise we could infinite loop + if (desiredSize.Width == rect.Width && desiredSize.Height == rect.Height) + return; + desiredSize = rect.Size; UpdateBarcode();