This is fine. If you have enough windows open that O(N) here is an issue, your actual problem is much bigger than this loop.
That said, you might as well put a break;
inside the if
. Also, it would probably be better architecture for the windows doing theTransactionsWindow.Show()
to also set theTransactionsWindow.Owner = this