Paddicake, according to www.drugs.com, neither the xanax nor the Nulev would cause any blood sugar problems but both 'could' cause the odd feelings you had that took you to the ER as well as the high blood sugar can. It's hard to say.
Being physically sick, feeling pain, being nervous - all that and more - can also cause our blood sugar to rise. You 'might' have problems with elevated blood sugar that's not related to any of that. Maybe your family genetics caught up with you. Well, whatever is going one, you are in a good place to learn what you can about
your own health.
If it's in your family, unfortunately, it may make you predisposed to diabetes but being aware of how to deal with it, you can avoid full-blown diabetes and its complications down the road. However, since you are also dealing with UC, you will need to find what works for you. There are several other members here at HealingWell who are also balancing the two.
For diabetes and keeping your blood sugar in control, you need to know that the more carbs you eat, the higher your blood sugar will be. So, keep that in mind. Some meds elevate blood sugar, particularly the steroids (as you know). Stress, sickness, pain (physical and emotional) can raise blood sugar. So diet is important and so is regular exercise like walking, cycling, swimming, etc. Using weights to tone muscle is very good, too.
Don't hesitate to ask any questions here. I hope you're feeling better!