You'll get an ArgumentOutOfRange exception with the message "'maxValue' must be greater than zero" if you pass a negative number to the random.Next() method. My guess is that it's happening in the AddEnemy() method when this is being called:
random.Next((int)playArea.ActualHeight - 100)
I bet you have a typo somewhere that's setting playArea's height to something that's less than 100 the first time AddEnemy() or AnimateEnemy() is called. That would cause a negative number to be passed into random.Next(). Copy and paste the code from the working version we published (see the book page
for links). Definitely download the working program and run it, sometimes it helps to see it running so you have a working version to compare your code with. It's probably just one typo!
Other things to check: make sure the Canvas control is named playArea (and not some other control), and also make sure its height is greater than 100, which would cause a negative number to be passed into random.Next().
I hope this helps!