Thank you for the quick response. I am able to reproduce the issue by modifying your sample.
First, I set the main window style in the code behind instead of in xaml.
Second, I created a new window and set it's style in code behind. That is the window that the main window opens.
I need to set the style at runtime. Maybe this is not the correct way to do that.
Attachment:
IntegerTextBox_Style_38e2637e.zip